[gtk+] GtkAssistant: Fix criticals on dispose



commit 2f8e4f2685a38d92bfb7b03159bc2640f6eff011
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jun 19 21:56:29 2015 -0400

    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.

 gtk/gtkassistant.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c
index 3d98963..b6d2d82 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]