From c917ddc3d1c07c8e1a77ebb7ca133deed134524f Mon Sep 17 00:00:00 2001 From: Matt Weir Date: Thu, 10 Dec 2020 10:25:42 +1300 Subject: [PATCH] Protect against null cnode when loading LocalNodes from database --- src/node.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/node.cpp b/src/node.cpp index 30cbdc7808..b0c2b9cc62 100644 --- a/src/node.cpp +++ b/src/node.cpp @@ -1444,9 +1444,12 @@ void LocalNode::setnode(Node* cnode) { deleted = false; - if (cnode) cnode->localnode.reset(); node.reset(); - node.crossref(cnode, this); + if (cnode) + { + cnode->localnode.reset(); + node.crossref(cnode, this); + } } void LocalNode::setnotseen(int newnotseen)