Skip to content

Commit 0f399a9

Browse files
author
MarcoFalke
committed
Merge #11326: Fix crash on shutdown with invalid wallet
77939f2 Fix uninitialized g_connman crash in Shutdown() (MeshCollider) Pull request description: Fixes bitcoin/bitcoin#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
2 parents 96d91b7 + 77939f2 commit 0f399a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ void Shutdown()
194194
// Because these depend on each-other, we make sure that neither can be
195195
// using the other before destroying them.
196196
UnregisterValidationInterface(peerLogic.get());
197-
g_connman->Stop();
197+
if(g_connman) g_connman->Stop();
198198
peerLogic.reset();
199199
g_connman.reset();
200200

0 commit comments

Comments
 (0)