Browse Source

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

Julius Pfrommer 4 years ago
parent
commit
9fc433d9d3
1 changed files with 1 additions and 1 deletions
  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;
     }