mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
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