mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
menubutton: don't dereference NULL GdkEvent
Since we explictly call popup_menu with NULL when it's keyboard-activated, we need to be careful and not access event->device without checking for event != NULL before.
This commit is contained in:
parent
0d665fdf45
commit
d22624b18e
@ -307,7 +307,9 @@ popup_menu (GtkMenuButton *menu_button,
|
||||
break;
|
||||
}
|
||||
|
||||
gtk_menu_popup_for_device (GTK_MENU (priv->menu), event->device, NULL, NULL,
|
||||
gtk_menu_popup_for_device (GTK_MENU (priv->menu),
|
||||
event ? event->device : NULL,
|
||||
NULL, NULL,
|
||||
func,
|
||||
GTK_WIDGET (menu_button),
|
||||
NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user