Commit 22188fba authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

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
parent 11f7ad89
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)
{
g_return_if_fail (store->empty_iter == NULL);
GtkTreeIter iter;
store->empty_iter = g_new0 (GtkTreeIter, 1);
g_return_if_fail (store->empty_iter == NULL);
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);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment