forked from AuroraMiddleware/gtk
popovermenu: Fail gracefully if no model
If we don't have a model yet, return FALSE from gtk_popover_menu_add_custom().
This commit is contained in:
parent
d2cc9365fc
commit
8ae415acff
@ -696,6 +696,8 @@ gtk_menu_section_box_add_custom (GtkPopoverMenu *popover,
|
||||
|
||||
stack = gtk_popover_get_child (GTK_POPOVER (popover));
|
||||
box = GTK_MENU_SECTION_BOX (gtk_stack_get_child_by_name (GTK_STACK (stack), "main"));
|
||||
if (box == NULL)
|
||||
return FALSE;
|
||||
|
||||
slot = (GtkWidget *)g_hash_table_lookup (box->custom_slots, id);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user