aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-05-24 15:52:52 -0400
committerGavin Andresen <gavinandresen@gmail.com>2013-05-24 15:52:52 -0400
commitdbc6dea1b27e87bca0ef496b8b74d6f027bb7de3 (patch)
tree6a1954599ea6b93ce54bb1dd44986ba96a48e476
parent8ab6d0a568013530c2df105fcc7c8dbdc894f74e (diff)
downloadbitcoin-dbc6dea1b27e87bca0ef496b8b74d6f027bb7de3.tar.xz
Fix crash-at-shutdown if exiting before initializing wallet
-rw-r--r--src/init.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index ebd9dee7b2..59bf32ecac 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -100,7 +100,8 @@ void Shutdown()
StopNode();
{
LOCK(cs_main);
- pwalletMain->SetBestChain(CBlockLocator(pindexBest));
+ if (pwalletMain)
+ pwalletMain->SetBestChain(CBlockLocator(pindexBest));
if (pblocktree)
pblocktree->Flush();
if (pcoinsTip)