PsppSheetView unrealize: Call parent method before any other operation
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 7 Jul 2012 07:39:21 +0000 (09:39 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sun, 8 Jul 2012 10:00:32 +0000 (12:00 +0200)
If this is not done, then gtk_widget_get_realized returns true, during
the unrealize execution, leading to mutual recursion.

src/ui/gui/pspp-sheet-view.c

index 02825483ccc6d7d830b72db4ca86a19cbf31b765..38eeb5d3e4cb63627d87906ff87b2892776103ec 100644 (file)
@@ -1519,6 +1519,8 @@ pspp_sheet_view_unrealize (GtkWidget *widget)
   PsppSheetViewPrivate *priv = tree_view->priv;
   GList *list;
 
+  GTK_WIDGET_CLASS (pspp_sheet_view_parent_class)->unrealize (widget);
+
   if (priv->scroll_timeout != 0)
     {
       g_source_remove (priv->scroll_timeout);
@@ -1595,8 +1597,6 @@ pspp_sheet_view_unrealize (GtkWidget *widget)
        }
       tree_view->priv->columns = NULL;
     }
-
-  GTK_WIDGET_CLASS (pspp_sheet_view_parent_class)->unrealize (widget);
 }
 
 /* GtkWidget::size_request helper */