Browse Source

Minor tweak to user_persist().

default 4 months ago
parent
commit
a2665c3cc9
1 changed files with 3 additions and 0 deletions
  1. 3 0
      data.c

+ 3 - 0
data.c

@@ -350,6 +350,9 @@ int user_persist(snac *snac, int publish)
                     const char *of = xs_dict_get(old, fields[n]);
                     const char *nf = xs_dict_get(snac->config, fields[n]);
 
+                    if (of == NULL && nf == NULL)
+                        continue;
+
                     if (xs_type(of) != XSTYPE_STRING || xs_type(nf) != XSTYPE_STRING || strcmp(of, nf)) {
                         nw = 1;
                         break;