app: fix a segmentation fault crash.
gtk_widget_get_window() may return NULL. I had the case when opening
some menus in bottom of tool options (like the "Save|Restore Tool
Preset" menus). We must check this before doing anything with it.
(cherry picked from commit 0a28534a90
)
This commit is contained in:
@ -1052,6 +1052,9 @@ gimp_ui_manager_item_key_press (GtkWidget *widget,
|
||||
{
|
||||
GtkWidget *parent = gtk_widget_get_parent (widget);
|
||||
GdkWindow *window = gtk_widget_get_window (parent);
|
||||
|
||||
if (window)
|
||||
{
|
||||
gint x, y;
|
||||
|
||||
gdk_window_get_pointer (window, &x, &y, NULL);
|
||||
@ -1066,6 +1069,7 @@ gimp_ui_manager_item_key_press (GtkWidget *widget,
|
||||
menu_item = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* first, get the help page from the item...
|
||||
*/
|
||||
|
Reference in New Issue
Block a user