fix potential crash

This commit is contained in:
dborth 2009-07-20 07:26:39 +00:00
parent f2773a5b9c
commit 0f16f3b191

View File

@ -95,13 +95,15 @@ int GCMemROM(int method, int size)
ErrorPrompt("FDS BIOS file is invalid!"); ErrorPrompt("FDS BIOS file is invalid!");
else else
ErrorPrompt("FDS BIOS file not found!"); ErrorPrompt("FDS BIOS file not found!");
return 0; // BIOS not loaded, do not load game
} }
free(tmpbuffer); free(tmpbuffer);
} }
// load game if (FDSBIOS[1] != 0)
if (FDSLoad(romFilename, fceufp)) {
romLoaded = true; // load game
if (FDSLoad(romFilename, fceufp))
romLoaded = true;
}
} }
delete fceufp; delete fceufp;