only unref if elt->ref_count > 0, (gtk_tree_model_filter_row_deleted):

2006-05-27  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_remove_node):
	only unref if elt->ref_count > 0,
	(gtk_tree_model_filter_row_deleted): likewise. (Fixes #340839,
	reported by Yevgen Muntyan).
This commit is contained in:
Kristian Rietveld 2006-05-27 21:48:46 +00:00 committed by Kristian Rietveld
parent e7b5cdb8e0
commit 5f46cc62c1
3 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2006-05-27 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_remove_node):
only unref if elt->ref_count > 0,
(gtk_tree_model_filter_row_deleted): likewise. (Fixes #340839,
reported by Yevgen Muntyan).
2006-05-27 Kristian Rietveld <kris@gtk.org>
Small refactoring. (#340428, Paolo Borelli).

View File

@ -1,3 +1,10 @@
2006-05-27 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_remove_node):
only unref if elt->ref_count > 0,
(gtk_tree_model_filter_row_deleted): likewise. (Fixes #340839,
reported by Yevgen Muntyan).
2006-05-27 Kristian Rietveld <kris@gtk.org>
Small refactoring. (#340428, Paolo Borelli).

View File

@ -994,7 +994,7 @@ gtk_tree_model_filter_remove_node (GtkTreeModelFilter *filter,
if (parent_level || filter->priv->virtual_root)
gtk_tree_model_filter_unref_node (GTK_TREE_MODEL (filter), iter);
else
else if (elt->ref_count > 0)
gtk_tree_model_filter_real_unref_node (GTK_TREE_MODEL (filter),
iter, FALSE);
@ -1792,7 +1792,7 @@ gtk_tree_model_filter_row_deleted (GtkTreeModel *c_model,
/* release the filter model's reference on the node */
if (level->parent_level || filter->priv->virtual_root)
gtk_tree_model_filter_unref_node (GTK_TREE_MODEL (filter), &iter);
else
else if (elt->ref_count > 0)
gtk_tree_model_filter_real_unref_node (GTK_TREE_MODEL (data), &iter,
FALSE);