Selaa lähdekoodia

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

Julius Pfrommer 4 vuotta sitten
vanhempi
commit
9fc433d9d3
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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;
     }