From 6f704c6c09f4ecb14fbc809a26fa11bf8ce6b85c Mon Sep 17 00:00:00 2001 From: Alban Browaeys Date: Fri, 25 May 2012 15:59:31 +0200 Subject: [PATCH] TpBaseClient: _tp_base_client_handle_channels does not check error for null icurrently empathy_tp_chat_new assert on TP_IS_ACCOUNT (account) . It looks like this is why I get a channel null and error null in _tp_base_client_handle_channels. But if channel is null the debug log derference error (and it is null here) for the message. Segfault ensue. This patch check for error being non null. Else it tells an assertion happened instead of error->message. --- telepathy-glib/base-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telepathy-glib/base-client.c b/telepathy-glib/base-client.c index bd4e2ed..c528c15 100644 --- a/telepathy-glib/base-client.c +++ b/telepathy-glib/base-client.c @@ -2335,7 +2335,7 @@ _tp_base_client_handle_channels (TpSvcClientHandler *iface, &error); if (channel == NULL) { - DEBUG ("Failed to create TpChannel: %s", error->message); + DEBUG ("Failed to create TpChannel: %s", (error)?error->message:"assert happend"); goto out; } -- 1.7.10