=?utf-8?q?=5Bfolks=5D_Bug_675292_=E2=80=94_Assertion_when_joining_IRC_cha?= =?utf-8?q?nnel?=



commit d71eabd2ee1fb2b5d6c266d35f20f6baccd4a23d
Author: Philip Withnall <philip tecnocode co uk>
Date:   Thu May 3 22:48:18 2012 +0100

    Bug 675292 â Assertion when joining IRC channel
    
    Correctly initialise Tpf.PersonaStore._favourite_ids on store construction,
    rather than on preparation. This prevents it being null at inopportune times.
    
    Closes: https://bugzilla.gnome.org/show_bug.cgi?id=675292

 NEWS                                          |    1 +
 backends/telepathy/lib/tpf-persona-store.vala |    7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/NEWS b/NEWS
index e0ab5c3..e9542b3 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ Bugs fixed:
 â Bug 674256 â telepathy-glib minimal version is insufficient
 â Bug 647909 â Port Folks to GSettings
 â Bug 663890 â @throws annotations missing for some functions
+â Bug 675292 â Assertion when joining IRC channel
 
 Overview of changes from libfolks 0.6.9 to libfolks 0.7.0
 =========================================================
diff --git a/backends/telepathy/lib/tpf-persona-store.vala b/backends/telepathy/lib/tpf-persona-store.vala
index 0256be2..ff9556e 100644
--- a/backends/telepathy/lib/tpf-persona-store.vala
+++ b/backends/telepathy/lib/tpf-persona-store.vala
@@ -53,8 +53,9 @@ public class Tpf.PersonaStore : Folks.PersonaStore
    * the roster. Persona is kept in the map until its TpContact is disposed. */
   private HashMap<unowned Contact, Persona> _contact_persona_map;
 
-  /* TpContact IDs */
-  private HashSet<string> _favourite_ids;
+  /* TpContact IDs. Note that this should *not* be cleared in _reset().
+   * See bgo#630822. */
+  private HashSet<string> _favourite_ids = new HashSet<string> ();
 
   private Connection _conn;
   private AccountManager? _account_manager; /* only null before prepare() */
@@ -475,7 +476,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
                         }
                     });
 
-              this._favourite_ids = new HashSet<string> ();
+              this._favourite_ids.clear ();
               this._logger = new Logger (this.id);
               this._logger.invalidated.connect (
                   this._logger_invalidated_cb);



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