diff --git a/src/gb/core.c b/src/gb/core.c index f1358ee69..68c2d2985 100644 --- a/src/gb/core.c +++ b/src/gb/core.c @@ -1084,7 +1084,7 @@ static void _GBCoreDetachDebugger(struct mCore* core) { static void _GBCoreLoadSymbols(struct mCore* core, struct VFile* vf) { core->symbolTable = mDebuggerSymbolTableCreate(); #if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 - if (!vf) { + if (!vf && core->dirs.base) { vf = mDirectorySetOpenSuffix(&core->dirs, core->dirs.base, ".sym", O_RDONLY); } #endif diff --git a/src/gba/core.c b/src/gba/core.c index 7a4650a33..7c1e19d21 100644 --- a/src/gba/core.c +++ b/src/gba/core.c @@ -1149,12 +1149,12 @@ static void _GBACoreLoadSymbols(struct mCore* core, struct VFile* vf) { core->symbolTable = mDebuggerSymbolTableCreate(); #if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 #ifdef USE_ELF - if (!vf) { + if (!vf && core->dirs.base) { closeAfter = true; vf = mDirectorySetOpenSuffix(&core->dirs, core->dirs.base, ".elf", O_RDONLY); } #endif - if (!vf) { + if (!vf && core->dirs.base) { closeAfter = true; vf = mDirectorySetOpenSuffix(&core->dirs, core->dirs.base, ".sym", O_RDONLY); }