mirror of https://github.com/GNOME/gimp.git
libgimpwidgets: don't leak the empty_iter in GimpIntStore
This commit is contained in:
parent
fa070d4cf9
commit
7cbb04c0f9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue