Code

store: Fixed handling of metric store values.
[sysdb.git] / src / core / plugin.c
index bf0bdb34a20af428c73ab63250c7b0f4d3f4c00b..f581eb1629fbe3f043c02e13f6a4f3799de9b6d4 100644 (file)
@@ -1386,7 +1386,7 @@ sdb_plugin_store_metric(const char *hostname, const char *name,
        if ((! hostname) || (! name))
                return -1;
 
-       if ((! store->type) || (! store->id))
+       if (store && ((! store->type) || (! store->id)))
                store = NULL;
 
        iter = sdb_llist_get_iter(writer_list);