aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-dispatcher.c9
1 files changed, 7 insertions, 2 deletions
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);
}