aboutsummaryrefslogtreecommitdiff
path: root/lib/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hash.c')
-rw-r--r--lib/hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/hash.c b/lib/hash.c
index f7d072482..7757d8b64 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -45,7 +45,8 @@ hash_element_dtor(void *user, void *element)
if(e->key)
free(e->key);
- h->dtor(e->ptr);
+ if(e->ptr)
+ h->dtor(e->ptr);
free(e);
}