Core: Only attempt to open BIOS if the path is non-null
Vicki Pfau vi@endrift.com
Mon, 20 Mar 2017 17:37:20 -0700
2 files changed,
6 insertions(+),
2 deletions(-)
M
src/gb/core.c
→
src/gb/core.c
@@ -275,7 +275,9 @@ break;
default: break; }; - bios = VFileOpen(configPath, O_RDONLY); + if (configPath) { + bios = VFileOpen(configPath, O_RDONLY); + } if (bios && GBIsBIOS(bios)) { found = true; } else if (bios) {
M
src/gba/core.c
→
src/gba/core.c
@@ -303,7 +303,9 @@ }
} if (!found) { const char* configPath = mCoreConfigGetValue(&core->config, "gba.bios"); - bios = VFileOpen(configPath, O_RDONLY); + if (configPath) { + bios = VFileOpen(configPath, O_RDONLY); + } if (bios && GBAIsBIOS(bios)) { found = true; } else if (bios) {