[folks/folks-0-4] Don't remove the wrong Individuals from IndividualAggregator



commit 29ab3e525540ee83960f132a9e2a18ea4b2f3eac
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 010edb7..9129a84 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,8 @@ Bugs fixed:
 * Crasher when removing Personas
 * Bug 645680 â?? Use random integer IDs for Kf.Personas
 * 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.4.1
 =========================================================
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index 6c0bb78..3d91fe1 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -676,14 +676,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]