forked from AuroraMiddleware/gtk
stack: check for widget before calling is_ancestor()
We can hit this path during the destruction case, where widget has been released. This fixes a lot of superfluous error messages on console.
This commit is contained in:
parent
5889905d1d
commit
bb53f893e2
@ -1023,6 +1023,7 @@ set_visible_child (GtkStack *stack,
|
||||
focus = gtk_window_get_focus (GTK_WINDOW (toplevel));
|
||||
if (focus &&
|
||||
priv->visible_child &&
|
||||
priv->visible_child->widget &&
|
||||
gtk_widget_is_ancestor (focus, priv->visible_child->widget))
|
||||
{
|
||||
contains_focus = TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user