PsppireValueEntry: Unref model after the combo box assumes it
authorJohn Darrington <john@darrington.wattle.id.au>
Tue, 24 Apr 2012 19:22:04 +0000 (21:22 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Tue, 24 Apr 2012 19:22:04 +0000 (21:22 +0200)
src/ui/gui/psppire-value-entry.c

index 322cb3a3b4eb13cfea28f9f05a0792b96ac7d47f..91dcdd47931e1c93e6ebdeee5fe0751f95f2c582 100644 (file)
@@ -280,6 +280,8 @@ psppire_value_entry_refresh_model (PsppireValueEntry *obj)
     }
 
   gtk_combo_box_set_model (GTK_COMBO_BOX (obj), model);
+  if ((model != NULL) && (model != old_model))
+    g_object_unref (model);
 }
 
 void