浏览代码

fix(server): Only clean up the nodestore if it has a context

Julius Pfrommer 4 年之前
父节点
当前提交
9fc433d9d3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/server/ua_server_config.c

+ 1 - 1
src/server/ua_server_config.c

@@ -48,7 +48,7 @@ UA_ServerConfig_clean(UA_ServerConfig *config) {
     config->endpointsSize = 0;
 
     /* Nodestore */
-    if(config->nodestore.clear) {
+    if(config->nodestore.context && config->nodestore.clear) {
         config->nodestore.clear(config->nodestore.context);
         config->nodestore.context = NULL;
     }