* made GetCount NULL pointer aware since its safe to say that a non existant hash...
authorWilfried Göesgens <willi@citadel.org>
Sat, 10 May 2008 08:42:41 +0000 (08:42 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sat, 10 May 2008 08:42:41 +0000 (08:42 +0000)
libcitadel/lib/hash.c

index 3908121d90c13a13bf54e3f774f8ee49436dd006..65d0519b58771ea679797d8b9734bbd15d92a0f9 100644 (file)
@@ -165,6 +165,7 @@ HashList *NewHash(int Uniq, HashFunc F)
 
 int GetCount(HashList *Hash)
 {
+       if(Hash==NULL) return 0;
        return Hash->nMembersUsed;
 }