[folks] IndividualAggregator: copy the list of stores before looping over it
- From: Raul Gutierrez Segales <raulgs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] IndividualAggregator: copy the list of stores before looping over it
- Date: Thu, 8 Sep 2011 18:17:04 +0000 (UTC)
commit c7a9b899f66333e3512087f14aab22c881c801dd
Author: Raul Gutierrez Segales <rgs collabora co uk>
Date: Thu Sep 8 18:19:35 2011 +0100
IndividualAggregator: copy the list of stores before looping over it
Because a Backend's list of PersonaStores can change while we are
iterating it, we do a copy before starting.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=658580
NEWS | 6 ++++--
folks/individual-aggregator.vala | 7 +++++--
2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/NEWS b/NEWS
index a52c8da..5039928 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
-Overview of changes from libfolks 0.6.2 to libfolks 0.6.3
-=========================================================
+Overview of changes from libfolks 0.6.2 to libfolks 0.6.2.1
+===========================================================
+Bugs fixed:
+* Bug 658580 â Assertion in gee_hash_map_node_iterator_next with folks 0.6.2
Overview of changes from libfolks 0.6.1 to libfolks 0.6.2
=========================================================
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index 4b158ae..b37a2a5 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -548,8 +548,11 @@ public class Folks.IndividualAggregator : Object
backend.notify["is-quiescent"].connect (
this._backend_is_quiescent_changed_cb);
- /* handle the stores that have already been signaled */
- foreach (var persona_store in backend.persona_stores.values)
+ /* Handle the stores that have already been signaled. Since
+ * this might change while we are looping, get a copy first.
+ */
+ var stores = backend.persona_stores.values.to_array ();
+ foreach (var persona_store in stores)
{
this._backend_persona_store_added_cb (backend, persona_store);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]