From e2e49f92dab827ca283b458af59c09e9c4053345 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 26 Sep 2011 15:36:39 -0700 Subject: [PATCH] Ensure we prepare all TpAccounts before trying to use them. Helps: bgo#659041 - tpf-persona-store.vala: try to connect to a NULL object --- backends/telepathy/lib/tpf-persona-store.vala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backends/telepathy/lib/tpf-persona-store.vala b/backends/telepathy/lib/tpf-persona-store.vala index 3ee7402..fb7363b 100644 --- a/backends/telepathy/lib/tpf-persona-store.vala +++ b/backends/telepathy/lib/tpf-persona-store.vala @@ -533,7 +533,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore * * See {@link Folks.PersonaStore.prepare}. */ - public override async void prepare () + public override async void prepare () throws GLib.Error { lock (this._is_prepared) { @@ -580,6 +580,9 @@ public class Tpf.PersonaStore : Folks.PersonaStore this._logger = null; } + /* Ensure the account's prepared first. */ + yield this.account.prepare_async (null); + this.account.status_changed.connect ( this._account_status_changed_cb); -- 2.7.4