aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2017-09-14 16:45:09 +0200
committerMarcoFalke <[email protected]>2017-09-14 16:45:16 +0200
commit0f399a9ff227896265cafab9b2e9fab6cdb9b5b9 (patch)
treea3c4257721abd78c798cf18b2ffe5d64ef395100 /src/init.cpp
parentcontrib: Ignore historical release notes for whitespace check (diff)
parentFix uninitialized g_connman crash in Shutdown() (diff)
downloaddiscoin-0f399a9ff227896265cafab9b2e9fab6cdb9b5b9.tar.xz
discoin-0f399a9ff227896265cafab9b2e9fab6cdb9b5b9.zip
Merge #11326: Fix crash on shutdown with invalid wallet
77939f27f Fix uninitialized g_connman crash in Shutdown() (MeshCollider) Pull request description: Fixes https://github.com/bitcoin/bitcoin/issues/11312 As @dooglus pointed out, `g_connman` is uninitialized when an invalid wallet path is passed on start up, but then dereferenced in `Shutdown()`, so this tiny PR just fixes that. Tree-SHA512: 2557133422a6e393017081450a7e6c100fe7d9ce36e628e5f5f479bc07617a7bd9a9ad4d44c0d8abadf2e3eb62a11ce9743abc27b4ae8c20f709e72df4f25a7f
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index a997f9740..6b9699213 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -194,7 +194,7 @@ void Shutdown()
// Because these depend on each-other, we make sure that neither can be
// using the other before destroying them.
UnregisterValidationInterface(peerLogic.get());
- g_connman->Stop();
+ if(g_connman) g_connman->Stop();
peerLogic.reset();
g_connman.reset();