[geary/mjog/mail-merge-plugin: 61/72] Sidebar.Branch: Fix assert when removing a folder
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/mail-merge-plugin: 61/72] Sidebar.Branch: Fix assert when removing a folder
- Date: Tue, 18 Aug 2020 06:32:46 +0000 (UTC)
commit f7ea243c9d3a5466daa0a70999338f988608c46c
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]