1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 14:26:39 +02:00

core: fix crash if key of hashtable_get(_item) is NULL (just return NULL)

This commit is contained in:
Sebastien Helleu
2012-08-05 10:29:39 +02:00
parent 8bda6a3559
commit 9258a63a6b
+1 -1
View File
@@ -375,7 +375,7 @@ hashtable_get_item (struct t_hashtable *hashtable, const void *key,
unsigned int key_hash;
struct t_hashtable_item *ptr_item;
if (!hashtable)
if (!hashtable || !key)
return NULL;
key_hash = hashtable->callback_hash_key (hashtable, key);