aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/init.cpp6
-rw-r--r--src/qt/bitcoin.cpp3
2 files changed, 6 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 02997cd357..472af5331b 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1041,6 +1041,9 @@ bool AppInit2(boost::thread_group& threadGroup)
if (!CheckDiskSpace())
return false;
+ if (!strErrors.str().empty())
+ return InitError(strErrors.str());
+
RandAddSeedPerfmon();
//// debug print
@@ -1062,9 +1065,6 @@ bool AppInit2(boost::thread_group& threadGroup)
uiInterface.InitMessage(_("Done loading"));
- if (!strErrors.str().empty())
- return InitError(strErrors.str());
-
// Add wallet transactions that aren't already in a block to mapTransactions
pwalletMain->ReacceptWalletTransactions();
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 1083f9bfe1..2d88700614 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -282,6 +282,9 @@ int main(int argc, char *argv[])
}
else
{
+ threadGroup.interrupt_all();
+ threadGroup.join_all();
+ Shutdown();
return 1;
}
} catch (std::exception& e) {