mirror of https://github.com/mgba-emu/mgba.git
Core: Only attempt to open BIOS if the path is non-null
This commit is contained in:
parent
af2db9073c
commit
91c0f95e5f
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue