From 9258a63a6bde96f5b8b5a66b44744033db84b4d1 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 5 Aug 2012 10:29:39 +0200 Subject: [PATCH] core: fix crash if key of hashtable_get(_item) is NULL (just return NULL) --- src/core/wee-hashtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/wee-hashtable.c b/src/core/wee-hashtable.c index 5ba961f50..ba25da341 100644 --- a/src/core/wee-hashtable.c +++ b/src/core/wee-hashtable.c @@ -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);