[folks/folks-0-2] Don't assume Personas all have a corresponding Individual in the link map.
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks/folks-0-2] Don't assume Personas all have a corresponding Individual in the link map.
- Date: Wed, 13 Oct 2010 15:44:54 +0000 (UTC)
commit 0a48835ab6a9d0728c976b95ada90d15cdc12549
Author: Travis Reitter <travis reitter collabora co uk>
Date: Wed Oct 13 08:44:10 2010 -0700
Don't assume Personas all have a corresponding Individual in the link map.
This can happen if a Persona is removed (by ID) before its corresponding
Individual has been added to the linked-personas map (which is possible if a
Telepathy account suddenly goes offline before the linking of the given Persona
is complete).
Fixes bgo#631864.
NEWS | 1 +
folks/individual-aggregator.vala | 9 +++++----
2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/NEWS b/NEWS
index 2509fbd..ceefc17 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ Overview of changes from libfolks 0.2.0 to libfolks 0.2.1
Bugs fixed:
* Bug 629642 â?? individuals-changed emitted in the wrong order
+* Bug 631864 â?? Crash when empathy disconnects
Overview of changes from libfolks 0.1.17 to libfolks 0.2.0
==========================================================
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index 035b403..8d98a2c 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -430,11 +430,12 @@ public class Folks.IndividualAggregator : Object
* eliminate them from the list of Personas to relink, below. */
removed_personas.add (persona);
- /* Find the Individual containing the Persona and mark them for
- * removal (any other Personas they have which aren't being removed
- * will be re-linked into other Individuals). */
+ /* Find the Individual containing the Persona (if any) and mark them
+ * for removal (any other Personas they have which aren't being
+ * removed will be re-linked into other Individuals). */
Individual ind = this.link_map.lookup (persona.iid);
- removed_individuals.prepend (ind);
+ if (ind != null)
+ removed_individuals.prepend (ind);
this.link_map.remove (persona.iid);
if (trust_level == PersonaStoreTrust.FULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]