[empathy/gnome-2-28] empathy_account_settings_get_tp_params: don't raise an error if tp_protocol is NULL
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy/gnome-2-28] empathy_account_settings_get_tp_params: don't raise an error if tp_protocol is NULL
- Date: Mon, 19 Oct 2009 11:09:41 +0000 (UTC)
commit 66fcb76f5ece44ed08a0772c1b361dc792c66dba
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Oct 19 12:06:17 2009 +0100
empathy_account_settings_get_tp_params: don't raise an error if tp_protocol is NULL
libempathy/empathy-account-settings.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c
index ea5a1e6..ec349ee 100644
--- a/libempathy/empathy-account-settings.c
+++ b/libempathy/empathy-account-settings.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]