]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/dict-splay.c
Fix typos and copy errors in memoserv help
[irc/evilnet/x3.git] / src / dict-splay.c
index 2e6f3a1dc3c2e4a95aad3252bb6f571917b5a9a1..1e473503666e39b0e22a102c2b27bc5a6df0672b 100644 (file)
@@ -78,6 +78,7 @@ dict_splay(struct dict_node *node, const char *key)
     int res;
 
     if (!node) return NULL;
+    if (!key) return NULL;
     N.l = N.r = NULL;
     l = r = &N;
 
@@ -228,6 +229,7 @@ dict_remove2(dict_t dict, const char *key, int no_dispose)
 
     if (!dict->root)
         return 0;
+    if (!key) return 0;
     verify(dict);
     dict->root = dict_splay(dict->root, key);
     if (irccasecmp(key, dict->root->key))