]> Pileus Git - ~andy/gtk/commitdiff
Don't leak the list store. (#148135, Crispin Flowerday)
authorMatthias Clasen <maclas@gmx.de>
Thu, 22 Jul 2004 03:00:48 +0000 (03:00 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 22 Jul 2004 03:00:48 +0000 (03:00 +0000)
Wed Jul 21 22:54:33 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkcomboboxentry.c (gtk_combo_box_entry_new_text):
Don't leak the list store.  (#148135, Crispin Flowerday)

gtk/gtkcombobox.c
gtk/gtkcomboboxentry.c

index e28b965c3b8fb9721e6c2c431404c022329adf56..78dbdb05e1963f8e1ee38ae1f76272598f7d1717 100644 (file)
@@ -2060,7 +2060,7 @@ gtk_combo_box_menu_fill (GtkComboBox *combo_box)
        {
          GtkCellView *cell_view;
 
-         cell_view = gtk_cell_view_new ();
+         cell_view = GTK_CELL_VIEW (gtk_cell_view_new ());
          gtk_cell_view_set_model (cell_view, combo_box->priv->model);
          gtk_cell_view_set_displayed_row (cell_view, path);
          gtk_widget_show (GTK_WIDGET (cell_view));
index 18927bdbdef8360087659593bba44770139a89de..7da2bd9a9989f7eff36f7b158ec43417440c6cdd 100644 (file)
@@ -383,8 +383,8 @@ gtk_combo_box_entry_new_text (void)
   GtkListStore *store;
 
   store = gtk_list_store_new (1, G_TYPE_STRING);
-
   entry_box = gtk_combo_box_entry_new_with_model (GTK_TREE_MODEL (store), 0);
+  g_object_unref (store);
 
   return entry_box;
 }