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:
parent
96cfbd1bb0
commit
e07c06cb16
|
@ -507,7 +507,10 @@ void CFrame::OnClose(wxCloseEvent& event)
|
|||
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||
{
|
||||
DoStop();
|
||||
event.Veto();
|
||||
if (event.CanVeto())
|
||||
{
|
||||
event.Veto();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -836,7 +836,10 @@ void CFrame::OnRenderParentClose(wxCloseEvent& event)
|
|||
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||
{
|
||||
DoStop();
|
||||
event.Veto();
|
||||
if (event.CanVeto())
|
||||
{
|
||||
event.Veto();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue