From 1d8375924a13dfe1d91a812482ba6f7f231ee7a6 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Fri, 14 Feb 2014 21:53:59 -0800 Subject: [PATCH] Allow double PSP_Shutdown() without any error. We call it in a few places to "ensure" shutdown, e.g. before resetting, but there are cases of double-shutdown. Let's allow it since there's there shouldn't be any multithreading here. --- Core/System.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/System.cpp b/Core/System.cpp index 9c5d4701d5..0b4357ebe5 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -375,6 +375,11 @@ bool PSP_IsInited() { } void PSP_Shutdown() { + // Do nothing if we never inited. + if (!pspIsInited && !pspIsIniting) { + return; + } + #ifndef MOBILE_DEVICE if (g_Config.bFuncHashMap) { MIPSAnalyst::StoreHashMap();