X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/1136f709ef8add5fa9ba8663db910003362e1bd2..0b401fb654b69fd9649954a9bdd5ff041971e62d:/src/dict-splay.c diff --git a/src/dict-splay.c b/src/dict-splay.c index 2e6f3a1..1e47350 100644 --- a/src/dict-splay.c +++ b/src/dict-splay.c @@ -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))