[glib/wip/menus: 28/35] GMenu: fix bug in iter implementation



commit 4ce66cdb1bd3b816b6aef9e4e537d1bc25f58a75
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Aug 25 00:50:35 2011 -0400

    GMenu: fix bug in iter implementation

 gio/gmenu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/gmenu.c b/gio/gmenu.c
index 3190fc4..3ec347e 100644
--- a/gio/gmenu.c
+++ b/gio/gmenu.c
@@ -93,7 +93,7 @@ g_menu_get_item_attributes (GMenuModel  *model,
 {
   GMenu *menu = G_MENU (model);
 
-  *quark_table = g_array_index (menu->items, struct item, position).attributes;
+  *quark_table = g_hash_table_ref (g_array_index (menu->items, struct item, position).attributes);
 }
 
 static void
@@ -104,7 +104,7 @@ g_menu_get_item_links (GMenuModel  *model,
 {
   GMenu *menu = G_MENU (model);
 
-  *quark_table = g_array_index (menu->items, struct item, position).links;
+  *quark_table = g_hash_table_ref (g_array_index (menu->items, struct item, position).links);
 }
 
 /**



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