aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-dispatcher.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-04-19 17:13:17 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-04-19 20:48:57 +0800
commite29d5a655b02386c615bef866f73ffec052ceba3 (patch)
tree432a4e9e14295bb9749030606d225e636d2e5a6b /libempathy/empathy-dispatcher.c
parent6f392c8adacd186ac9895d44f64543e59cef8925 (diff)
downloadgsoc2013-empathy-e29d5a655b02386c615bef866f73ffec052ceba3.tar
gsoc2013-empathy-e29d5a655b02386c615bef866f73ffec052ceba3.tar.gz
gsoc2013-empathy-e29d5a655b02386c615bef866f73ffec052ceba3.tar.bz2
gsoc2013-empathy-e29d5a655b02386c615bef866f73ffec052ceba3.tar.lz
gsoc2013-empathy-e29d5a655b02386c615bef866f73ffec052ceba3.tar.xz
gsoc2013-empathy-e29d5a655b02386c615bef866f73ffec052ceba3.tar.zst
gsoc2013-empathy-e29d5a655b02386c615bef866f73ffec052ceba3.zip
empathy_dispatcher_chat_with_contact: check if connection_data is NULL
If the connection has been invalidated, it has been removed from priv->connections so we should check to avoid using a NULL pointer (#615970).
Diffstat (limited to 'libempathy/empathy-dispatcher.c')
-rw-r--r--libempathy/empathy-dispatcher.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c
index 3cd8df40f..d0dbc6380 100644
--- a/libempathy/empathy-dispatcher.c
+++ b/libempathy/empathy-dispatcher.c
@@ -1423,6 +1423,11 @@ empathy_dispatcher_chat_with_contact (EmpathyContact *contact,
connection = empathy_contact_get_connection (contact);
connection_data = g_hash_table_lookup (priv->connections, connection);
+ if (connection_data == NULL)
+ {
+ /* Connection has been invalidated */
+ goto out;
+ }
/* The contact handle might not be known yet */
request_data = new_dispatcher_request_data (self, connection,
@@ -1435,6 +1440,7 @@ empathy_dispatcher_chat_with_contact (EmpathyContact *contact,
dispatcher_request_channel (request_data);
+out:
g_object_unref (self);
}