Only free hash table if it's not NULL
authorDavid Zeuthen <davidz@redhat.com>
Fri, 29 May 2009 15:09:16 +0000 (11:09 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Fri, 29 May 2009 15:09:16 +0000 (11:09 -0400)
src/polkit/polkitdetails.c

index b263194..bef0704 100644 (file)
@@ -63,7 +63,8 @@ polkit_details_finalize (GObject *object)
 
   details = POLKIT_DETAILS (object);
 
-  g_hash_table_unref (details->hash);
+  if (details->hash != NULL)
+    g_hash_table_unref (details->hash);
 
   if (G_OBJECT_CLASS (polkit_details_parent_class)->finalize != NULL)
     G_OBJECT_CLASS (polkit_details_parent_class)->finalize (object);