浏览代码

Only release node if not NULL

Stefan Profanter 7 年之前
父节点
当前提交
0f069c58a4
共有 1 个文件被更改,包括 2 次插入0 次删除
  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