From 2f81c2b400f87ee10a2857ee25858aed6abaf569 Mon Sep 17 00:00:00 2001 From: "Sven M. Hallberg" Date: Sun, 5 May 2013 19:32:23 +0200 Subject: [PATCH] fix hashtable iteration in h_hashtable_update --- src/datastructures.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/datastructures.c b/src/datastructures.c index a1aca91..271f4c6 100644 --- a/src/datastructures.c +++ b/src/datastructures.c @@ -171,6 +171,8 @@ void h_hashtable_update(HHashTable *dst, const HHashTable *src) { HHashTableEntry *hte; for(i=0; i < src->capacity; i++) { for(hte = &src->contents[i]; hte; hte = hte->next) { + if(hte->key == NULL) + continue; h_hashtable_put(dst, hte->key, hte->value); } }