From 2545da8e0418392325058c69376c32d0ea70cb3d Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Thu, 5 May 2022 11:55:17 +0600 Subject: [PATCH] qt: attempt fixing freezes on power off of emulated machine --- src/qt/qt_platform.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 9a2f2d8a2..b697a6728 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -371,7 +372,7 @@ plat_power_off(void) cycles -= 99999999; cpu_thread_run = 0; - main_window->close(); + QTimer::singleShot(0, main_window, &QMainWindow::close); } void set_language(uint32_t id) {