[gtk+] treemodelfilter: guard for building already existing levels
- From: Kristian Rietveld <kristian src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] treemodelfilter: guard for building already existing levels
- Date: Mon, 22 Aug 2011 19:42:08 +0000 (UTC)
commit 52de413d43c410f0794fe55f9ef5d5deb3562aa4
Author: Kristian Rietveld <kris gtk org>
Date: Sun Jul 10 16:21:08 2011 +0200
treemodelfilter: guard for building already existing levels
gtk/gtktreemodelfilter.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c
index 67a4ee8..69d2f45 100644
--- a/gtk/gtktreemodelfilter.c
+++ b/gtk/gtktreemodelfilter.c
@@ -526,6 +526,12 @@ gtk_tree_model_filter_build_level (GtkTreeModelFilter *filter,
g_assert (filter->priv->child_model != NULL);
+ /* Avoid building a level that already exists */
+ if (parent_level)
+ g_assert (g_array_index (parent_level->array, FilterElt, parent_elt_index).children == NULL);
+ else
+ g_assert (filter->priv->root == NULL);
+
if (filter->priv->in_row_deleted)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]