[geary/mjog/mail-merge-plugin: 3/10] Sidebar.Branch: Fix assert when removing a folder




commit aaf58007e9ba5962b9d9f65e45e8ae8212117345
Author: Michael Gratton <mike vee net>
Date:   Fri Aug 14 14:55:37 2020 +1000

    Sidebar.Branch: Fix assert when removing a folder
    
    Doesn't help, just remove it.

 src/client/sidebar/sidebar-branch.vala | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/src/client/sidebar/sidebar-branch.vala b/src/client/sidebar/sidebar-branch.vala
index 934194fab..bc0299343 100644
--- a/src/client/sidebar/sidebar-branch.vala
+++ b/src/client/sidebar/sidebar-branch.vala
@@ -73,18 +73,15 @@ public class Sidebar.Branch : Geary.BaseObject {
         public void remove_child(Node child) {
             Gee.SortedSet<Node> new_children = new Gee.TreeSet<Node>(comparator_wrapper);
 
-            // For similar reasons as in reorder_child(), can't rely on TreeSet to locate this
-            // node because we need reference equality.
-            bool found = false;
+            // For similar reasons as in reorder_child(), can't rely
+            // on TreeSet to locate this node because we need
+            // reference equality.
             foreach (Node c in children) {
-                if (c != child)
+                if (c != child) {
                     new_children.add(c);
-                else
-                    found = true;
+                }
             }
 
-            assert(found);
-
             if (new_children.size != 0)
                 children = new_children;
             else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]