Audit and cleanup dispose methods of classes which have them.
[pspp] / src / ui / gui / psppire-acr.c
index b858df268eb904ac927576af39b47b4efc3db74b..a876413fd582e5b7dd137b742c4314e811c3b7be 100644 (file)
@@ -50,6 +50,11 @@ static void
 psppire_acr_dispose (GObject *obj)
 {
   PsppireAcr *acr = PSPPIRE_ACR (obj);
+
+  if (acr->dispose_has_run)
+    return;
+  acr->dispose_has_run = TRUE;
+
   psppire_acr_set_model (acr, NULL);
 
   G_OBJECT_CLASS (psppire_acr_parent_class)->dispose (obj);
@@ -259,6 +264,8 @@ psppire_acr_init (PsppireAcr *acr)
 
   GtkWidget *sw = gtk_scrolled_window_new (NULL, NULL);
 
+  acr->dispose_has_run = FALSE;
+
   gtk_orientable_set_orientation (GTK_ORIENTABLE (acr), GTK_ORIENTATION_HORIZONTAL);
 
   acr->tv = GTK_TREE_VIEW (gtk_tree_view_new ());