summaryrefslogtreecommitdiff
path: root/gtk/gtkassistant.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-06-19 21:56:29 -0400
committerMatthias Clasen <mclasen@redhat.com>2015-06-19 21:56:29 -0400
commit2f8e4f2685a38d92bfb7b03159bc2640f6eff011 (patch)
tree8aab90c4b831cfbd1cf744b1ae0c8f673d163c27 /gtk/gtkassistant.c
parentd6a52218d185cae483db11d7f9b46804034b4241 (diff)
downloadgtk+-2f8e4f2685a38d92bfb7b03159bc2640f6eff011.tar.gz
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.
Diffstat (limited to 'gtk/gtkassistant.c')
-rw-r--r--gtk/gtkassistant.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c
index 3d989637d2..b6d2d82d6a 100644
--- a/gtk/gtkassistant.c
+++ b/gtk/gtkassistant.c
@@ -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);