GtkAssistant: Fix criticals on dispose

After the recent change thta introduced boxes between the pages
and the notebook, we were no longer careful enough when disposing
the assistant. Fix that up.
This commit is contained in:
Matthias Clasen 2015-06-19 21:56:29 -04:00
parent d6a52218d1
commit 2f8e4f2685

View File

@ -1472,7 +1472,9 @@ gtk_assistant_remove (GtkContainer *container,
/* Forward this removal to the content notebook */
box = gtk_widget_get_parent (page);
if (gtk_widget_get_parent (box) == assistant->priv->content)
if (GTK_IS_BOX (box) &&
assistant->priv->content != NULL &&
gtk_widget_get_parent (box) == assistant->priv->content)
{
container = (GtkContainer *) assistant->priv->content;
gtk_container_remove (container, box);