diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-04-19 17:13:17 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-04-19 21:33:48 +0800 |
commit | 9b3759d6a7c7ce4ec9c49cce1f7424270f19999d (patch) | |
tree | 779b13160e6ea2769412bf6c542cc5a6495d95f7 | |
parent | e095c83e79fed15c8bb42edf5fc8e872e6006bcf (diff) | |
download | gsoc2013-empathy-9b3759d6a7c7ce4ec9c49cce1f7424270f19999d.tar gsoc2013-empathy-9b3759d6a7c7ce4ec9c49cce1f7424270f19999d.tar.gz gsoc2013-empathy-9b3759d6a7c7ce4ec9c49cce1f7424270f19999d.tar.bz2 gsoc2013-empathy-9b3759d6a7c7ce4ec9c49cce1f7424270f19999d.tar.lz gsoc2013-empathy-9b3759d6a7c7ce4ec9c49cce1f7424270f19999d.tar.xz gsoc2013-empathy-9b3759d6a7c7ce4ec9c49cce1f7424270f19999d.tar.zst gsoc2013-empathy-9b3759d6a7c7ce4ec9c49cce1f7424270f19999d.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).
-rw-r--r-- | libempathy/empathy-dispatcher.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c index 94d97cc75..0f8474d87 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); } |