From 49babfb60be41f88139f7e71dad30de564780286 Mon Sep 17 00:00:00 2001 From: EmptyChaos Date: Tue, 19 Apr 2016 05:47:51 +0000 Subject: [PATCH] CFrame: Fix Confirm Close Closing Dolphin's main frame and clicking "no" does not clear m_bClosing which means that pressing the "stop" button triggers OnClosed which suddenly and unexpectedly closes the main frame. --- Source/Core/DolphinWX/Frame.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 1707cf4a51..9a6c70712d 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -576,8 +576,6 @@ void CFrame::OnActive(wxActivateEvent& event) void CFrame::OnClose(wxCloseEvent& event) { - m_bClosing = true; - // Before closing the window we need to shut down the emulation core. // We'll try to close this window again once that is done. if (Core::GetState() != Core::CORE_UNINITIALIZED) @@ -587,6 +585,9 @@ void CFrame::OnClose(wxCloseEvent& event) { event.Veto(); } + // Tell OnStopped to resubmit the Close event + if (m_confirmStop) + m_bClosing = true; return; }