blob: 66b288ba70f9ffa67b417baf6ec739012e1d711c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
=== modified file 'libgwibber/streams.vala'
--- old/libgwibber/streams.vala 2012-03-19 13:35:30 +0000
+++ new/libgwibber/streams.vala 2012-04-04 20:53:49 +0000
@@ -213,13 +213,21 @@
model = create_model ();
}
model.row_removed.connect((_m, _i) => {
+ var to_remove = new GLib.List <string> ();
foreach (var v in seen.entries)
{
if (v.value == _i)
{
- seen.unset(v.key);
+ /* defer calling unset until after we are done iterating
+ * the HashMap, it will resize making the iterator invalid
+ * This is fixed in the 0.7 series of libgee
+ * https://bugzilla.gnome.org/show_bug.cgi?id=671327
+ */
+ to_remove.prepend (v.key);
}
}
+ foreach (var v in to_remove)
+ seen.unset(v);
});
Idle.add(() => {
refresh_model_async.begin ();
|