mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 17:23:40 +01:00
Error handling fixes (close the file).
This commit is contained in:
1 parent
4b73672b79
commit
b1b8fc65cf
1 file changed
+2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user