From 4c2e195ca63240c1f6ad9b6b75d761f54ee94f77 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Mon, 23 Apr 2012 21:12:04 +0200 Subject: [PATCH 3/5] PsppireValueEntry: unref old model before setting the new one --- src/ui/gui/psppire-value-entry.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/ui/gui/psppire-value-entry.c b/src/ui/gui/psppire-value-entry.c index 85dbaa0..44ad2d0 100644 --- a/src/ui/gui/psppire-value-entry.c +++ b/src/ui/gui/psppire-value-entry.c @@ -278,6 +278,8 @@ psppire_value_entry_refresh_model (PsppireValueEntry *obj) GtkEntry *entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (obj))); gtk_entry_set_text (entry, ""); } + else if (old_model) + g_object_unref (old_model); gtk_combo_box_set_model (GTK_COMBO_BOX (obj), model); gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (obj), COL_LABEL); -- 1.7.2.5