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.
This commit is contained in:
EmptyChaos 2016-04-19 05:47:51 +00:00
parent 5e4554df42
commit 49babfb60b
1 changed files with 3 additions and 2 deletions

View File

@ -576,8 +576,6 @@ void CFrame::OnActive(wxActivateEvent& event)
void CFrame::OnClose(wxCloseEvent& event) void CFrame::OnClose(wxCloseEvent& event)
{ {
m_bClosing = true;
// Before closing the window we need to shut down the emulation core. // Before closing the window we need to shut down the emulation core.
// We'll try to close this window again once that is done. // We'll try to close this window again once that is done.
if (Core::GetState() != Core::CORE_UNINITIALIZED) if (Core::GetState() != Core::CORE_UNINITIALIZED)
@ -587,6 +585,9 @@ void CFrame::OnClose(wxCloseEvent& event)
{ {
event.Veto(); event.Veto();
} }
// Tell OnStopped to resubmit the Close event
if (m_confirmStop)
m_bClosing = true;
return; return;
} }