From e07c06cb16d13dace0b06995155be1b3770d5726 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Tue, 29 Jul 2014 11:26:19 +0200 Subject: [PATCH] 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. --- Source/Core/DolphinWX/Frame.cpp | 5 ++++- Source/Core/DolphinWX/FrameTools.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index e1ee904653..422d818432 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -507,7 +507,10 @@ void CFrame::OnClose(wxCloseEvent& event) if (Core::GetState() != Core::CORE_UNINITIALIZED) { DoStop(); - event.Veto(); + if (event.CanVeto()) + { + event.Veto(); + } return; } diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index 7da062645f..6fc1865c5a 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -836,7 +836,10 @@ void CFrame::OnRenderParentClose(wxCloseEvent& event) if (Core::GetState() != Core::CORE_UNINITIALIZED) { DoStop(); - event.Veto(); + if (event.CanVeto()) + { + event.Veto(); + } return; }