From fce3414c6557481818485dd4e4d41a15b9e3429a Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 19 Jun 2022 15:44:18 +1000 Subject: [PATCH] INISettingsInterface: Don't try to save with no filename --- pcsx2/Frontend/INISettingsInterface.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pcsx2/Frontend/INISettingsInterface.cpp b/pcsx2/Frontend/INISettingsInterface.cpp index 36b9cc5da7..634e6e3616 100644 --- a/pcsx2/Frontend/INISettingsInterface.cpp +++ b/pcsx2/Frontend/INISettingsInterface.cpp @@ -36,6 +36,9 @@ INISettingsInterface::~INISettingsInterface() bool INISettingsInterface::Load() { + if (m_filename.empty()) + return false; + SI_Error err = SI_FAIL; auto fp = FileSystem::OpenManagedCFile(m_filename.c_str(), "rb"); if (fp) @@ -46,6 +49,9 @@ bool INISettingsInterface::Load() bool INISettingsInterface::Save() { + if (m_filename.empty()) + return false; + SI_Error err = SI_FAIL; std::FILE* fp = FileSystem::OpenCFile(m_filename.c_str(), "wb"); if (fp)