Procházet zdrojové kódy

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

Julius Pfrommer před 4 roky
rodič
revize
9fc433d9d3
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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;
     }