Commit bcdb6064 authored by Simon McVittie's avatar Simon McVittie

g_menu_markup_start_element: tolerate not having a hash table of objects

I don't know whether this is the right fix, but gio/tests/gmenumodel
crashes out, which can't be right.
parent 93f8f815
......@@ -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));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment