From 30bd7e18f075b6ccff7db221e2a9d78832d76c16 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Sat, 12 Jul 2025 13:07:44 -0700 Subject: [PATCH] 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. --- Source/Core/Core/HW/EXI/EXI_DeviceAGP.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceAGP.cpp b/Source/Core/Core/HW/EXI/EXI_DeviceAGP.cpp index f035003cf0..8b7e62d305 100644 --- a/Source/Core/Core/HW/EXI/EXI_DeviceAGP.cpp +++ b/Source/Core/Core/HW/EXI/EXI_DeviceAGP.cpp @@ -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)