From d8e6d9a444325fa428fb27faabdbd605ce91e8d5 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 9 Sep 2009 17:36:46 +0100 Subject: dispatcher_request_failed: check if conn_data is not NULL Trace attached on lp #392678 seems to indicate that the priv->connections hash table doesn't have a ConnectionData associated with the connection. A possible explanation could be that this connection has been invalidated before the RequestChannel call is terminated. Check if ConnectionData so Empathy won't crash in such case. --- libempathy/empathy-dispatcher.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libempathy') diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c index 6313752d9..ef9d180b6 100644 --- a/libempathy/empathy-dispatcher.c +++ b/libempathy/empathy-dispatcher.c @@ -1142,8 +1142,13 @@ dispatcher_request_failed (EmpathyDispatcher *dispatcher, if (request_data->cb != NULL) request_data->cb (NULL, error, request_data->user_data); - conn_data->outstanding_requests = - g_list_remove (conn_data->outstanding_requests, request_data); + if (conn_data != NULL) + { + conn_data->outstanding_requests = + g_list_remove (conn_data->outstanding_requests, request_data); + } + /* else Connection has been invalidated */ + free_dispatcher_request_data (request_data); } -- cgit v1.2.3