diff --git a/GPU/Common/ReplacedTexture.cpp b/GPU/Common/ReplacedTexture.cpp index d07c18cac1..d8803a5f8a 100644 --- a/GPU/Common/ReplacedTexture.cpp +++ b/GPU/Common/ReplacedTexture.cpp @@ -364,6 +364,7 @@ bool ReplacedTexture::LoadLevelData(VFSFileReference *fileRef, const std::string // Already populated from cache. TODO: Move this above the first read, and take level.w/h from the cache. if (!out.empty()) { + vfs_->CloseFile(openFile); *pixelFormat = levelData_->fmt; return true; } @@ -382,6 +383,7 @@ bool ReplacedTexture::LoadLevelData(VFSFileReference *fileRef, const std::string } if (!good) { + vfs_->CloseFile(openFile); return false; }