From 42262b58235949608f0a75d6c023d0880585e138 Mon Sep 17 00:00:00 2001 From: goeiecool9999 <7033575+goeiecool9999@users.noreply.github.com> Date: Fri, 16 Jan 2026 00:51:46 +0100 Subject: [PATCH] UI: Fix crash on exit hotkey button press --- src/gui/wxgui/input/HotkeySettings.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/wxgui/input/HotkeySettings.cpp b/src/gui/wxgui/input/HotkeySettings.cpp index c7da2f06..d84ffa1b 100644 --- a/src/gui/wxgui/input/HotkeySettings.cpp +++ b/src/gui/wxgui/input/HotkeySettings.cpp @@ -198,7 +198,9 @@ void HotkeySettings::Init(MainWindow* mainWindowFrame) ActiveSettings::SetTimerShiftFactor((ActiveSettings::GetTimerShiftFactor() < 3) ? 3 : 1); }}, {&s_cfgHotkeys.exitApplication, [](void) { - s_mainWindow->Close(true); + auto closeEvent = new wxCloseEvent{wxEVT_CLOSE_WINDOW, s_mainWindow->GetId()}; + closeEvent->SetCanVeto(false); + wxQueueEvent(s_mainWindow, closeEvent); }}, #ifdef CEMU_DEBUG_ASSERT {&s_cfgHotkeys.endEmulation, [](void) {