Don't ever ever let CFrame::DoStop() run twice at the same time.
This commit is contained in:
parent
e110f1049c
commit
e9ffba7ab8
|
@ -1017,6 +1017,9 @@ void CFrame::DoStop()
|
||||||
if (confirmStop)
|
if (confirmStop)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// don't let this function run again until it finishes, or is aborted.
|
||||||
|
confirmStop = true;
|
||||||
|
|
||||||
m_bGameLoading = false;
|
m_bGameLoading = false;
|
||||||
if (Core::GetState() != Core::CORE_UNINITIALIZED ||
|
if (Core::GetState() != Core::CORE_UNINITIALIZED ||
|
||||||
m_RenderParent != NULL)
|
m_RenderParent != NULL)
|
||||||
|
@ -1030,7 +1033,6 @@ void CFrame::DoStop()
|
||||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop)
|
||||||
{
|
{
|
||||||
Core::EState state = Core::GetState();
|
Core::EState state = Core::GetState();
|
||||||
confirmStop = true;
|
|
||||||
Core::SetState(Core::CORE_PAUSE);
|
Core::SetState(Core::CORE_PAUSE);
|
||||||
wxMessageDialog m_StopDlg(
|
wxMessageDialog m_StopDlg(
|
||||||
this,
|
this,
|
||||||
|
@ -1040,10 +1042,10 @@ void CFrame::DoStop()
|
||||||
wxDefaultPosition);
|
wxDefaultPosition);
|
||||||
|
|
||||||
int Ret = m_StopDlg.ShowModal();
|
int Ret = m_StopDlg.ShowModal();
|
||||||
confirmStop = false;
|
|
||||||
if (Ret != wxID_YES)
|
if (Ret != wxID_YES)
|
||||||
{
|
{
|
||||||
Core::SetState(state);
|
Core::SetState(state);
|
||||||
|
confirmStop = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1058,6 +1060,7 @@ void CFrame::DoStop()
|
||||||
wxBeginBusyCursor();
|
wxBeginBusyCursor();
|
||||||
BootManager::Stop();
|
BootManager::Stop();
|
||||||
wxEndBusyCursor();
|
wxEndBusyCursor();
|
||||||
|
confirmStop = false;
|
||||||
|
|
||||||
#if defined(HAVE_X11) && HAVE_X11
|
#if defined(HAVE_X11) && HAVE_X11
|
||||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bDisableScreenSaver)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bDisableScreenSaver)
|
||||||
|
|
Loading…
Reference in New Issue