CFrame: Handle close events that can't be vetoed.

This can happen during shutdown.

As long as we don't call event.Skip() the CFrame won't be closed yet, so even if we can't veto the shutdown will still happen in the correct order.
This commit is contained in:
Jules Blok 2014-07-29 11:26:19 +02:00
parent 96cfbd1bb0
commit e07c06cb16
2 changed files with 8 additions and 2 deletions

View File

@ -507,7 +507,10 @@ void CFrame::OnClose(wxCloseEvent& event)
if (Core::GetState() != Core::CORE_UNINITIALIZED)
{
DoStop();
if (event.CanVeto())
{
event.Veto();
}
return;
}

View File

@ -836,7 +836,10 @@ void CFrame::OnRenderParentClose(wxCloseEvent& event)
if (Core::GetState() != Core::CORE_UNINITIALIZED)
{
DoStop();
if (event.CanVeto())
{
event.Veto();
}
return;
}