aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2014-09-25 09:03:30 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2014-09-25 13:49:49 +0200
commit20a11ffabf0c6936ab2dbb7cfda676996318650a (patch)
treea660cad30bf1e7f1044bc4f5e09e59bffe56c634 /src/init.cpp
parentb50e5fe099b3e9d8ece46b239ce930750df2120e (diff)
downloadbitcoin-20a11ffabf0c6936ab2dbb7cfda676996318650a.tar.xz
minor variable init changes in init.cpp
- explicit init of pcoinsdbview and pwalletMain (even if not needed, as globals are init to NULL, it seems cleaner) - remove check if (pwalletMain) in Shutdown() as delete is valid even if pwalletMain is NULL
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 7299bd0f4a..87b5ae7a44 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -45,7 +45,7 @@ using namespace boost;
using namespace std;
#ifdef ENABLE_WALLET
-CWallet* pwalletMain;
+CWallet* pwalletMain = NULL;
#endif
#ifdef WIN32
@@ -109,7 +109,7 @@ bool ShutdownRequested()
return fRequestShutdown;
}
-static CCoinsViewDB *pcoinsdbview;
+static CCoinsViewDB *pcoinsdbview = NULL;
void Shutdown()
{
@@ -165,8 +165,8 @@ void Shutdown()
#endif
UnregisterAllWallets();
#ifdef ENABLE_WALLET
- if (pwalletMain)
- delete pwalletMain;
+ delete pwalletMain;
+ pwalletMain = NULL;
#endif
LogPrintf("%s: done\n", __func__);
}
@@ -701,6 +701,7 @@ bool AppInit2(boost::thread_group& threadGroup)
fIsBareMultisigStd = GetArg("-permitbaremultisig", true) != 0;
// ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log
+
// Sanity check
if (!InitSanityCheck())
return InitError(_("Initialization sanity check failed. Bitcoin Core is shutting down."));