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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user