forked from AuroraMiddleware/gtk
Avoid a critical
gtk_window_get_focus can return NULL, deal with it. https://bugzilla.gnome.org/show_bug.cgi?id=740812
This commit is contained in:
parent
8753ef6129
commit
e26fddc544
@ -311,7 +311,7 @@ window_focus_in (GtkWidget *widget,
|
||||
|
||||
focus = gtk_window_get_focus (GTK_WINDOW (widget));
|
||||
|
||||
if (!gtk_widget_is_ancestor (focus, GTK_WIDGET (popover)))
|
||||
if (focus == NULL || !gtk_widget_is_ancestor (focus, GTK_WIDGET (popover)))
|
||||
gtk_widget_grab_focus (GTK_WIDGET (popover));
|
||||
|
||||
if (priv->grab_notify_blocked)
|
||||
|
Loading…
Reference in New Issue
Block a user