mirror of https://github.com/GNOME/gimp.git
if we free the iter with gtk_tree_iter_free() we must also allocate it
2007-05-18 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpintstore.c (gimp_int_store_add_empty): if we free the iter with gtk_tree_iter_free() we must also allocate it with gtk_tree_iter_copy() or gslice will explode. svn path=/trunk/; revision=22532
This commit is contained in:
parent
11f7ad890c
commit
22188fba45
|
@ -1,3 +1,9 @@
|
|||
2007-05-18 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* libgimpwidgets/gimpintstore.c (gimp_int_store_add_empty): if we
|
||||
free the iter with gtk_tree_iter_free() we must also allocate it
|
||||
with gtk_tree_iter_copy() or gslice will explode.
|
||||
|
||||
2007-05-18 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/dialogs/preferences-dialog.c (prefs_dialog_new): made the
|
||||
|
|
|
@ -229,15 +229,17 @@ gimp_int_store_row_inserted (GtkTreeModel *model,
|
|||
static void
|
||||
gimp_int_store_add_empty (GimpIntStore *store)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
|
||||
g_return_if_fail (store->empty_iter == NULL);
|
||||
|
||||
store->empty_iter = g_new0 (GtkTreeIter, 1);
|
||||
|
||||
gtk_list_store_prepend (GTK_LIST_STORE (store), store->empty_iter);
|
||||
gtk_list_store_set (GTK_LIST_STORE (store), store->empty_iter,
|
||||
gtk_list_store_prepend (GTK_LIST_STORE (store), &iter);
|
||||
gtk_list_store_set (GTK_LIST_STORE (store), &iter,
|
||||
GIMP_INT_STORE_VALUE, -1,
|
||||
GIMP_INT_STORE_LABEL, (_("(Empty)")),
|
||||
-1);
|
||||
|
||||
store->empty_iter = gtk_tree_iter_copy (&iter);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue