[folks/648811-dummy-backend-rebase1] Only remove the persona from the personas list after the loop, to avoid problems with the iterator.
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks/648811-dummy-backend-rebase1] Only remove the persona from the personas list after the loop, to avoid problems with the iterator.
- Date: Thu, 7 Nov 2013 12:28:35 +0000 (UTC)
commit b4310252ef5043cb9f0aa70c9c0a7f9bcf64d175
Author: Renato Araujo Oliveira Filho <renato filho canonical com>
Date: Thu Nov 7 09:02:19 2013 -0300
Only remove the persona from the personas list after the loop, to avoid problems with the iterator.
backends/dummy/lib/dummy-persona-store.vala | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/backends/dummy/lib/dummy-persona-store.vala b/backends/dummy/lib/dummy-persona-store.vala
index e71d27b..42a660c 100644
--- a/backends/dummy/lib/dummy-persona-store.vala
+++ b/backends/dummy/lib/dummy-persona-store.vala
@@ -1061,10 +1061,16 @@ public class FolksDummy.PersonaStore : Folks.PersonaStore
continue;
removed_personas.add ((!) persona);
- if (emit_notifications == true)
- this._personas.unset (((!) persona).iid);
}
+ if (emit_notifications == true)
+ {
+ foreach(var _persona in removed_personas)
+ {
+ this._personas.unset (((!) _persona).iid);
+ }
+ }
+
if (removed_personas.size > 0 && emit_notifications == true)
this._emit_personas_changed (null, removed_personas);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]