libgimpwidgets: don't leak the empty_iter in GimpIntStore

This commit is contained in:
Michael Natterer 2014-10-06 20:31:51 +02:00
parent fa070d4cf9
commit 7cbb04c0f9
1 changed files with 2 additions and 9 deletions

View File

@ -222,6 +222,8 @@ gimp_int_store_row_inserted (GtkTreeModel *model,
memcmp (iter, store->empty_iter, sizeof (GtkTreeIter)))
{
gtk_list_store_remove (GTK_LIST_STORE (store), store->empty_iter);
gtk_tree_iter_free (store->empty_iter);
store->empty_iter = NULL;
}
}
@ -229,17 +231,8 @@ static void
gimp_int_store_row_deleted (GtkTreeModel *model,
GtkTreePath *path)
{
GimpIntStore *store = GIMP_INT_STORE (model);
if (parent_iface->row_deleted)
parent_iface->row_deleted (model, path);
if (store->empty_iter)
{
/* freeing here crashes, no clue why. will be freed in finalize() */
/* gtk_tree_iter_free (store->empty_iter); */
store->empty_iter = NULL;
}
}
static void