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 <laanwj@gmail.com>
This commit is contained in:
Wladimir J. van der Laan 2018-02-07 10:30:59 +01:00
parent 1462bde767
commit f5a4c3ddf4

View file

@ -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
}
}