GtkPopover: avoid a critical
focus_widget can be NULL, as pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=723181#c7
This commit is contained in:
@ -246,7 +246,9 @@ gtk_popover_apply_modality (GtkPopover *popover,
|
||||
GtkWidget *prev_focus;
|
||||
|
||||
prev_focus = gtk_window_get_focus (priv->window);
|
||||
priv->prev_focus_widget = g_object_ref (prev_focus);
|
||||
priv->prev_focus_widget = prev_focus;
|
||||
if (priv->prev_focus_widget)
|
||||
g_object_ref (prev_focus);
|
||||
gtk_grab_add (GTK_WIDGET (popover));
|
||||
gtk_widget_grab_focus (GTK_WIDGET (popover));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user