]> git.0d.be Git - empathy.git/commitdiff
empathy_account_settings_get_tp_params: don't raise an error if tp_protocol is NULL
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 19 Oct 2009 11:06:17 +0000 (12:06 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 19 Oct 2009 11:10:16 +0000 (12:10 +0100)
libempathy/empathy-account-settings.c

index ea5a1e6181ac7ccac8e10332da9caaa4a6f3b379..ec349ee92c9cdd240537b7ec83672435a77a2822 100644 (file)
@@ -31,6 +31,9 @@
 #include "empathy-connection-managers.h"
 #include "empathy-utils.h"
 
+#define DEBUG_FLAG EMPATHY_DEBUG_ACCOUNT
+#include <libempathy/empathy-debug.h>
+
 #define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyAccountSettings)
 
 G_DEFINE_TYPE(EmpathyAccountSettings, empathy_account_settings, G_TYPE_OBJECT)
@@ -453,7 +456,12 @@ empathy_account_settings_get_tp_params (EmpathyAccountSettings *settings)
 
   tp_protocol = tp_connection_manager_get_protocol (priv->manager,
      priv->protocol);
-  g_return_val_if_fail (tp_protocol != NULL, NULL);
+  if (tp_protocol == NULL)
+    {
+      DEBUG ("Can't retrieve TpConnectionManagerProtocol for protocol '%s'",
+          priv->protocol);
+      return NULL;
+    }
 
   return tp_protocol->params;
 }