]> Pileus Git - ~andy/gtk/commitdiff
treemodelfilter: bring if-condition in sync
authorKristian Rietveld <kris@gtk.org>
Sun, 11 Sep 2011 18:16:34 +0000 (20:16 +0200)
committerKristian Rietveld <kris@gtk.org>
Sun, 11 Sep 2011 18:19:56 +0000 (20:19 +0200)
Bring the if-condition in sync with the other if-conditions in the
function where the "path" variable is used.

gtk/gtktreemodelfilter.c

index df09ddaa96c0f498bae8288123d4e89e74bd2b87..cee7777d02be88b7031a56d67586d8d01729908d 100644 (file)
@@ -1650,7 +1650,7 @@ gtk_tree_model_filter_remove_elt_from_level (GtkTreeModelFilter *filter,
   iter.user_data = level;
   iter.user_data2 = elt;
 
-  if (orig_level_ext_ref_count > 0)
+  if (!parent || orig_level_ext_ref_count > 0)
     path = gtk_tree_model_get_path (GTK_TREE_MODEL (filter), &iter);
   else
     /* If the level is not visible, the parent is potentially invisible