Browse Source

Only release node if not NULL

Stefan Profanter 7 years ago
parent
commit
0f069c58a4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      plugins/ua_nodestore_default.c

+ 2 - 0
plugins/ua_nodestore_default.c

@@ -258,6 +258,8 @@ UA_NodeMap_getNode(void *context, const UA_NodeId *nodeid) {
 
 static void
 UA_NodeMap_releaseNode(void *context, const UA_Node *node) {
+    if (!node)
+        return;
 #ifdef UA_ENABLE_MULTITHREADING
     UA_NodeMap *ns = (UA_NodeMap*)context;
 #endif