forked from AuroraMiddleware/gtk
menusectionbox: Avoid a critical warning
The popover may already be gone when the item is activated. Don't trigger a critical in that case. Related: #2986
This commit is contained in:
parent
64ed69c56f
commit
e0c7d7daeb
@ -189,8 +189,9 @@ gtk_popover_item_activate (GtkWidget *button,
|
||||
/* Activating the item could cause the popover
|
||||
* to be free'd, for example if it is a Quit item
|
||||
*/
|
||||
popover = g_object_ref (gtk_widget_get_ancestor (button,
|
||||
GTK_TYPE_POPOVER));
|
||||
popover = gtk_widget_get_ancestor (button, GTK_TYPE_POPOVER);
|
||||
if (popover)
|
||||
g_object_ref (popover);
|
||||
}
|
||||
|
||||
gtk_menu_tracker_item_activated (item);
|
||||
|
Loading…
Reference in New Issue
Block a user