Fix g_hash_table_foreach crash with NULL hash table
authorChristophe Fergeau <cfergeau@redhat.com>
Thu, 9 Feb 2012 16:59:55 +0000 (17:59 +0100)
committerChristophe Fergeau <cfergeau@redhat.com>
Fri, 10 Feb 2012 09:03:38 +0000 (10:03 +0100)
commit6d3b31a533d74b727bca5ac720a81eacb8aee31e
treeddb9bda07a42302b18638a3f1d7a3c066353d90b
parentb17b135d9f4fa5652d64decf1d1cd0cad7de21f0
Fix g_hash_table_foreach crash with NULL hash table

When G_DISABLE_ASSERT is not defined, g_hash_table_foreach and
g_hash_table_find dereferences the hash table argument before
checking if it's NULL. This causes a crash when one of this function
is mistakenly called with a NULL argument instead of returning
with a warning through g_return_if_fail.
glib/ghash.c