diff --git a/src/gb/core.c b/src/gb/core.c index 496bca866..7fb4cbe60 100644 --- a/src/gb/core.c +++ b/src/gb/core.c @@ -275,7 +275,9 @@ static void _GBCoreReset(struct mCore* core) { default: break; }; - bios = VFileOpen(configPath, O_RDONLY); + if (configPath) { + bios = VFileOpen(configPath, O_RDONLY); + } if (bios && GBIsBIOS(bios)) { found = true; } else if (bios) { diff --git a/src/gba/core.c b/src/gba/core.c index 3a53641a7..2ed68e435 100644 --- a/src/gba/core.c +++ b/src/gba/core.c @@ -303,7 +303,9 @@ static void _GBACoreReset(struct mCore* core) { } 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) {