gui: Properly manage ref counts of combo box and tree view models.
[pspp] / src / ui / gui / text-data-import-dialog.c
index c4abeaa48b2e8f5b9969972ef5bd9ea7a7201933..ec62ac0e673e0b87a005e872a4015622a03fab66 100644 (file)
@@ -1077,6 +1077,7 @@ set_quote_list (GtkComboBoxEntry *cb)
     }
 
   gtk_combo_box_set_model (GTK_COMBO_BOX (cb), GTK_TREE_MODEL (list));
+  g_object_unref (list);
 
   gtk_combo_box_entry_set_text_column (cb, 0);
 }
@@ -1954,6 +1955,7 @@ make_tree_view (const struct import_assistant *ia,
   g_object_set_data (G_OBJECT (model), "first-line",
                      GINT_TO_POINTER (first_line));
   gtk_tree_view_set_model (*tree_view, model);
+  g_object_unref (model);
 
   add_line_number_column (ia, *tree_view);
 }