[folks] Don't remove the wrong Individuals from IndividualAggregator



commit 9fa57c03a51e4c5b4eaf04642ebab7a52d62003f
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Tue Apr 12 20:42:06 2011 +0100

    Don't remove the wrong Individuals from IndividualAggregator
    
    In IndividualAggregator._individual_removed_cb(), don't remove the individual
    from IndividualAggregator.individuals unless it is actually the individual
    which is emitting the "removed" signal.
    
    Closes: bgo#647121

 NEWS                             |    2 ++
 folks/individual-aggregator.vala |    8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/NEWS b/NEWS
index 14a31cd..584440c 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ Overview of changes from libfolks 0.5.0 to libfolks 0.5.1
 Bugs fixed:
 * Bug 645388 â?? Group channels are leaked
 * Bug 647562 â?? Don't crash on duplicate group channels
+* Bug 647121 â?? Crash in individual_store_contact_sort at
+  empathy-individual-store.c line 1387
 
 Overview of changes from libfolks 0.4.0 to libfolks 0.5.0
 =========================================================
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index ce60273..1531400 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -793,14 +793,14 @@ public class Folks.IndividualAggregator : Object
 
   private void _individual_removed_cb (Individual i, Individual? replacement)
     {
+      if (this.user == i)
+        this.user = null;
+
       /* Only signal if the individual is still in this.individuals. This allows
        * us to group removals together in, e.g., _personas_changed_cb(). */
-      if (this.individuals.lookup (i.id) == null)
+      if (this.individuals.lookup (i.id) != i)
         return;
 
-      if (this.user == i)
-        this.user = null;
-
       var i_list = new GLib.List<Individual> ();
       i_list.append (i);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]