summaryrefslogtreecommitdiff
path: root/goa-mc-plugin
diff options
context:
space:
mode:
authorMarco Barisione <marco.barisione@collabora.co.uk>2013-07-18 15:09:35 +0100
committerMarco Barisione <marco.barisione@collabora.co.uk>2013-07-18 15:17:12 +0100
commit07c3b37828c4ecb649e439859254916a87b36707 (patch)
treed64e6539bfc6445ed0905b57d992338cf95fc2bc /goa-mc-plugin
parenta073a5676a16dde521676f9701d51929d811d4a9 (diff)
downloadempathy-07c3b37828c4ecb649e439859254916a87b36707.tar.gz
GOA: ignore non-Telepathy accounts
This fixes a crash when trying to remove a GOA account without chat support. https://bugzilla.gnome.org/show_bug.cgi?id=704469
Diffstat (limited to 'goa-mc-plugin')
-rw-r--r--goa-mc-plugin/mcp-account-manager-goa.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/goa-mc-plugin/mcp-account-manager-goa.c b/goa-mc-plugin/mcp-account-manager-goa.c
index dc9e036ee..74949852d 100644
--- a/goa-mc-plugin/mcp-account-manager-goa.c
+++ b/goa-mc-plugin/mcp-account-manager-goa.c
@@ -194,6 +194,9 @@ object_chat_changed_cb (GoaObject *object,
char *name = get_tp_account_name (account);
gboolean enabled;
+ if (name == NULL)
+ return;
+
enabled = (goa_object_peek_chat (object) != NULL);
DEBUG ("%s %s", name, enabled ? "enabled" : "disabled");
@@ -289,6 +292,9 @@ _account_removed_cb (GoaClient *client,
GoaAccount *account = goa_object_peek_account (object);
char *name = get_tp_account_name (account);
+ if (name == NULL)
+ return;
+
if (self->priv->ready)
g_signal_emit_by_name (self, "deleted", name);