projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93f8f81
)
g_menu_markup_start_element: tolerate not having a hash table of objects
author
Simon McVittie
<simon.mcvittie@collabora.co.uk>
Wed, 14 Dec 2011 12:31:31 +0000
(12:31 +0000)
committer
Simon McVittie
<simon.mcvittie@collabora.co.uk>
Wed, 14 Dec 2011 12:31:31 +0000
(12:31 +0000)
I don't know whether this is the right fix, but gio/tests/gmenumodel
crashes out, which can't be right.
gio/gmenumarkup.c
patch
|
blob
|
history
diff --git
a/gio/gmenumarkup.c
b/gio/gmenumarkup.c
index bde3989f425332d492b1e6dfb7f24c4ef0785fd5..3d79f0fc04276c1ca7ee4fdb47a9c0fe16241f24 100644
(file)
--- a/
gio/gmenumarkup.c
+++ b/
gio/gmenumarkup.c
@@
-244,7
+244,7
@@
g_menu_markup_start_element (GMarkupParseContext *context,
g_menu_item_set_link (state->frame.item, name, G_MENU_MODEL (menu));
g_menu_markup_push_frame (state, menu, NULL);
- if (id != NULL)
+ if (id != NULL
&& state->objects != NULL
)
g_hash_table_insert (state->objects, g_strdup (id), g_object_ref (menu));
}