Fix a segmentation fault that occurs when "Confirm on Stop" is enabled, the close button of the window is clicked, and the user answers No to the resulting confirmation. Fixes issue 3716.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6601 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2010-12-17 15:23:33 +00:00
parent 77a36cf9cb
commit 22f19f6fdb
1 changed files with 10 additions and 9 deletions

View File

@ -543,27 +543,28 @@ void CFrame::OnActive(wxActivateEvent& event)
void CFrame::OnClose(wxCloseEvent& event)
{
if (Core::GetState() != Core::CORE_UNINITIALIZED)
{
DoStop();
if (Core::GetState() != Core::CORE_UNINITIALIZED)
return;
UpdateGUI();
}
//Stop Dolphin from saving the minimized Xpos and Ypos
if(main_frame->IsIconized())
main_frame->Iconize(false);
// Don't forget the skip or the window won't be destroyed
event.Skip();
// Save GUI settings
if (g_pCodeWindow) SaveIniPerspectives();
// Close the log window now so that its settings are saved
if (!g_pCodeWindow)
m_LogWindow->Close();
else m_LogWindow->Close();
// Uninit
m_Mgr->UnInit();
if (Core::GetState() != Core::CORE_UNINITIALIZED)
{
DoStop();
UpdateGUI();
}
}
// Post events