Don't crash when you can't open a file that doesn't exist

This commit is contained in:
Pavel Krajcevski 2014-11-03 15:57:34 -05:00
parent 0c25135555
commit 6f82ab8941
2 changed files with 3 additions and 2 deletions

View File

@ -71,7 +71,6 @@ int main(int argc, char **argv) {
ImageFile imgf (argv[1]);
if(!imgf.Load()) {
fprintf(stderr, "Error loading file: %s\n", argv[1]);
return 1;
}

View File

@ -95,8 +95,10 @@ public:
}
~FileStreamImpl() {
if (0 != m_FilePtr) {
fclose(m_FilePtr);
}
}
void IncreaseReferenceCount() { m_ReferenceCount++; }
void DecreaseReferenceCount() { m_ReferenceCount--; }