From 6f1fb20b1ccb4aa863135f45ab73199350b4d78c Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Thu, 11 Apr 2019 02:07:44 +0200 Subject: [PATCH] Ref T596, do not call shutdown if close is called, as close already calls shutdown --- src/blackgui/guiapplication.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/blackgui/guiapplication.cpp b/src/blackgui/guiapplication.cpp index ab42b7460..56c579a87 100644 --- a/src/blackgui/guiapplication.cpp +++ b/src/blackgui/guiapplication.cpp @@ -695,9 +695,14 @@ namespace BlackGui { // a close event might already trigger a shutdown if (!sGui || sGui->isShuttingDown()) { return; } + if (!this->mainApplicationWidget()) { return; } this->mainApplicationWidget()->close(); - this->gracefulShutdown(); - }); + + // T596, do not shutdown here, as close can be canceled + // if shutdown is called, there is no way back + // this->gracefulShutdown(); + }, + Qt::QueuedConnection); Q_ASSERT_X(c, Q_FUNC_INFO, "Connect failed"); Q_UNUSED(c); }