Core: Only attempt to open BIOS if the path is non-null

This commit is contained in:
Vicki Pfau 2017-03-20 17:37:20 -07:00
parent af2db9073c
commit 91c0f95e5f
2 changed files with 6 additions and 2 deletions

View File

@ -275,7 +275,9 @@ static void _GBCoreReset(struct mCore* core) {
default:
break;
};
if (configPath) {
bios = VFileOpen(configPath, O_RDONLY);
}
if (bios && GBIsBIOS(bios)) {
found = true;
} else if (bios) {

View File

@ -303,7 +303,9 @@ static void _GBACoreReset(struct mCore* core) {
}
if (!found) {
const char* configPath = mCoreConfigGetValue(&core->config, "gba.bios");
if (configPath) {
bios = VFileOpen(configPath, O_RDONLY);
}
if (bios && GBAIsBIOS(bios)) {
found = true;
} else if (bios) {