From f5a4c3ddf48db2119b2b1a438b9462a6236565cd Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 7 Feb 2018 10:30:59 +0100 Subject: qt: Make sure splash screen is freed on AppInitMain fail The `splashFinished` event was never sent if AppInitMain fails, causing the splash screen to stick around, causing problems later. This bug has existed for a while but is now trigging potential crashed because the splash screen subscribes to wallet events. Meant to fix #12372. Signed-off-by: Wladimir J. van der Laan --- src/qt/bitcoin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index b26d99a20a..1e91d63dd1 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -516,6 +516,7 @@ void BitcoinApplication::initializeResult(bool success) QTimer::singleShot(100, paymentServer, SLOT(uiReady())); #endif } else { + Q_EMIT splashFinished(window); quit(); // Exit main loop } } -- cgit v1.2.3 From 1e5d14b3f7db814505279d346f0b819443753e66 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 7 Feb 2018 10:37:19 +0100 Subject: qt: Clarify some comments Signed-off-by: Wladimir J. van der Laan --- src/qt/bitcoin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 1e91d63dd1..ae255bcefe 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -516,14 +516,14 @@ void BitcoinApplication::initializeResult(bool success) QTimer::singleShot(100, paymentServer, SLOT(uiReady())); #endif } else { - Q_EMIT splashFinished(window); - quit(); // Exit main loop + Q_EMIT splashFinished(window); // Make sure splash screen doesn't stick around during shutdown + quit(); // Exit first main loop invocation } } void BitcoinApplication::shutdownResult() { - quit(); // Exit main loop after shutdown finished + quit(); // Exit second main loop invocation after shutdown finished } void BitcoinApplication::handleRunawayException(const QString &message) -- cgit v1.2.3