[glib/wip/menus] Don't unref a hash table if it is NULL



commit 98c5d8ed951925acf432bcb3b07e828d7ee8cf41
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Oct 29 01:53:23 2011 -0400

    Don't unref a hash table if it is NULL

 gio/gmenumarkup.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gio/gmenumarkup.c b/gio/gmenumarkup.c
index ba3baa6..14605bf 100644
--- a/gio/gmenumarkup.c
+++ b/gio/gmenumarkup.c
@@ -463,7 +463,8 @@ g_menu_markup_parser_end_menu (GMarkupParseContext *context)
 
   menu = state->frame.menu;
 
-  g_hash_table_unref (state->objects);
+  if (state->objects)
+    g_hash_table_unref (state->objects);
   g_slice_free (GMenuMarkupState, state);
 
   return menu;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]