aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortucenaber <tucenaber@gmail.com>2012-10-23 22:41:47 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-10-25 20:45:38 +0200
commit3026baaa7c3fbd33f7208dbc0e426ae33a78bf73 (patch)
tree0fce5a2a0460931663a1f55f50fee48bbacf76ff /src
parent344620e9530dfc359b181c5481b88942448006a8 (diff)
downloadbitcoin-3026baaa7c3fbd33f7208dbc0e426ae33a78bf73.tar.xz
Added checks for null pointers in Shutdown
Estetics
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 45658e49d0..d9b892c659 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -78,8 +78,10 @@ void Shutdown(void* parg)
StopNode();
{
LOCK(cs_main);
- pcoinsTip->Flush();
- pblocktree->Flush();
+ if (pcoinsTip)
+ pcoinsTip->Flush();
+ if (pblocktree)
+ pblocktree->Flush();
delete pcoinsTip;
delete pcoinsdbview;
delete pblocktree;