[empathy] GOA: ignore non-Telepathy accounts



commit 07c3b37828c4ecb649e439859254916a87b36707
Author: Marco Barisione <marco barisione collabora co uk>
Date:   Thu Jul 18 15:09:35 2013 +0100

    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

 goa-mc-plugin/mcp-account-manager-goa.c |    6 ++++++
 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 dc9e036..7494985 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);
 


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