stack: Don't transition when the visible child is remove

This is a corner-case, and it is causing crashes in
the shortcuts window, after a11ab6c995.
This commit is contained in:
Matthias Clasen 2020-10-24 20:54:55 -04:00
parent 2546b88661
commit 434b145ee0

View File

@ -1474,12 +1474,7 @@ stack_remove (GtkStack *stack,
was_visible = gtk_widget_get_visible (child);
if (priv->visible_child == child_info)
{
if (in_dispose)
priv->visible_child = NULL;
else
set_visible_child (stack, NULL, priv->transition_type, priv->transition_duration);
}
priv->visible_child = NULL;
if (priv->last_visible_child == child_info)
priv->last_visible_child = NULL;