summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-12-18 14:28:02 +0000
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-12-18 18:41:00 +0000
commit6c3fee622752404275333df672d0d0970b819cf2 (patch)
tree4f86a5affb0747fae4823026428270040966524e /src
parent67e61a2f508c9ed75fe7b892c52f7fae53f49cf6 (diff)
Make sure we only call the callback if it's still alive
Diffstat (limited to 'src')
-rw-r--r--src/bytestream-factory.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/bytestream-factory.c b/src/bytestream-factory.c
index 908c6f986..acdad38d7 100644
--- a/src/bytestream-factory.c
+++ b/src/bytestream-factory.c
@@ -2121,19 +2121,18 @@ streaminit_reply_cb (GabbleConnection *conn,
END:
if (!success && bytestream != NULL)
{
- /* Initiation failed. We remove the stream */
remove_bytestream (self, bytestream);
bytestream = NULL;
}
/* user callback */
- data->func (bytestream, (const gchar*) data->stream_id, reply_msg,
- data->object, data->user_data);
+ if (data->object_alive)
+ data->func (bytestream, (const gchar*) data->stream_id, reply_msg,
+ data->object, data->user_data);
if (peer_resource != NULL)
g_free (peer_resource);
-
if (peer_handle != 0)
tp_handle_unref (contact_repo, peer_handle);