From cc5142000bd34928b6ee2f293766265de468bccd Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Sun, 24 Apr 2022 23:09:34 -0500 Subject: [PATCH] MTGS: Prevent the emulator from crashing if GS fails to init --- pcsx2/MTGS.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcsx2/MTGS.cpp b/pcsx2/MTGS.cpp index c91f55f4d3..4a85089c57 100644 --- a/pcsx2/MTGS.cpp +++ b/pcsx2/MTGS.cpp @@ -859,6 +859,8 @@ bool SysMtgsThread::WaitForOpen() } RethrowException(); + if (!m_Opened) // EE thread will continue running and explode everything if we don't throw an exception + throw Exception::RuntimeError(std::runtime_error("GS failed to open.")); return m_Opened; #else if (!m_sem_OpenDone.Wait(wxTimeSpan(0, 0, 12, 0)) || !m_Opened)