Browse Source

Merge pull request #2606 from gavinandresen/threadfix

Exit cleanly if AppInit2 returns false
miguelfreitas
Pieter Wuille 12 years ago
parent
commit
f309cb76c2
  1. 6
      src/init.cpp
  2. 3
      src/qt/bitcoin.cpp

6
src/init.cpp

@ -1041,6 +1041,9 @@ bool AppInit2(boost::thread_group& threadGroup) @@ -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) @@ -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();

3
src/qt/bitcoin.cpp

@ -282,6 +282,9 @@ int main(int argc, char *argv[]) @@ -282,6 +282,9 @@ int main(int argc, char *argv[])
}
else
{
threadGroup.interrupt_all();
threadGroup.join_all();
Shutdown();
return 1;
}
} catch (std::exception& e) {

Loading…
Cancel
Save