[libdazzle] tree: check return values before removal
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] tree: check return values before removal
- Date: Wed, 29 Nov 2017 07:21:44 +0000 (UTC)
commit 8c1e00c19e1d8590e27a8e607f40f81009a1f7ad
Author: Christian Hergert <chergert redhat com>
Date: Tue Nov 28 23:11:25 2017 -0800
tree: check return values before removal
src/tree/dzl-tree.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/tree/dzl-tree.c b/src/tree/dzl-tree.c
index 858792a..711bf5e 100644
--- a/src/tree/dzl-tree.c
+++ b/src/tree/dzl-tree.c
@@ -1516,13 +1516,13 @@ _dzl_tree_invalidate (DzlTree *self,
if (path != NULL)
{
- gtk_tree_model_get_iter (model, &iter, path);
- if (gtk_tree_model_iter_children (model, &child, &iter))
+ if (gtk_tree_model_get_iter (model, &iter, path))
{
- while (gtk_tree_store_remove (priv->store, &child))
+ if (gtk_tree_model_iter_children (model, &child, &iter))
{
- /* Do nothing */
+ while (gtk_tree_store_remove (priv->store, &child))
+ { /* Do nothing */ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]