mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-25 09:29:10 +00:00
Don't crash when you can't open a file that doesn't exist
This commit is contained in:
parent
0c25135555
commit
6f82ab8941
2 changed files with 3 additions and 2 deletions
|
@ -71,7 +71,6 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
ImageFile imgf (argv[1]);
|
ImageFile imgf (argv[1]);
|
||||||
if(!imgf.Load()) {
|
if(!imgf.Load()) {
|
||||||
fprintf(stderr, "Error loading file: %s\n", argv[1]);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,9 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
~FileStreamImpl() {
|
~FileStreamImpl() {
|
||||||
fclose(m_FilePtr);
|
if (0 != m_FilePtr) {
|
||||||
|
fclose(m_FilePtr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IncreaseReferenceCount() { m_ReferenceCount++; }
|
void IncreaseReferenceCount() { m_ReferenceCount++; }
|
||||||
|
|
Loading…
Reference in a new issue