CEXIAgp: Don't create save file if path is empty

Fix creation of a ".sav" file in the current working directory on
emulation shutdown when a slot is set to "Advance Game Port" and the
"GBA Cartridge Path" is empty.

Fixes https://bugs.dolphin-emu.org/issues/12975.
This commit is contained in:
Dentomologist
2025-07-12 13:07:44 -07:00
parent f76ab86326
commit 30bd7e18f0

View File

@ -41,7 +41,8 @@ CEXIAgp::~CEXIAgp()
SplitPath(Config::Get(Config::GetInfoForAGPCartPath(m_slot)), &path, &filename, &ext);
gbapath = path + filename;
SaveFileFromEEPROM(gbapath + ".sav");
if (!gbapath.empty())
SaveFileFromEEPROM(gbapath + ".sav");
}
void CEXIAgp::CRC8(const u8* data, u32 size)