From: Philip Withnall Date: Tue, 4 Sep 2012 23:41:22 +0000 (+0100) Subject: Bug 683319 — Crash in individual-aggregator: _personas_changed_cb X-Git-Tag: FOLKS_0_7_4_1~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b6cd964139abb85e09fff26dce1992f4f9895f19;p=platform%2Fupstream%2Ffolks.git Bug 683319 — Crash in individual-aggregator: _personas_changed_cb Keep a reference to the Tpf.PersonaStore’s self persona when emitting a ‘personas changed’ notification about it, so that it doesn’t get unset in the store’s member variable in the mean time, resulting in a null persona being emitted in the ‘personas changed’ signal. Closes: https://bugzilla.gnome.org/show_bug.cgi?id=683319 --- diff --git a/NEWS b/NEWS index 86e828a..cc93f5e 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ Bugs fixed: • Bug 682346 — build: Make telepathy backend optional • Bug 682809 — Lazy instantiation of multi-valued properties • Bug 682719 — eds test fails to compile +• Bug 683319 — Crash in individual-aggregator: _personas_changed_cb Overview of changes from libfolks 0.7.2 to libfolks 0.7.3 ========================================================= diff --git a/backends/telepathy/lib/tpf-persona-store.vala b/backends/telepathy/lib/tpf-persona-store.vala index 3fb9809..eb152d6 100644 --- a/backends/telepathy/lib/tpf-persona-store.vala +++ b/backends/telepathy/lib/tpf-persona-store.vala @@ -1091,13 +1091,17 @@ public class Tpf.PersonaStore : Folks.PersonaStore var personas_added = new HashSet (); var personas_removed = new HashSet (); - /* Remove old self persona if not also part of roster */ - if (this._self_persona != null && - !this._self_persona.is_in_contact_list && - this._remove_persona (this._self_persona)) + /* Remove old self persona if not also part of roster. Keep a reference + * to the persona so _remove_persona() doesn't unset it early. */ + var self_persona = this._self_persona; + + if (self_persona != null && + !self_persona.is_in_contact_list && + this._remove_persona (self_persona)) { - personas_removed.add (this._self_persona); + personas_removed.add (self_persona); } + this._self_persona = null; if (contact != null)