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:
Cosimo Cecchi 2012-06-29 18:30:53 -04:00
parent 0d665fdf45
commit d22624b18e

View File

@ -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,