summaryrefslogtreecommitdiff
path: root/libempathy
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-21 12:42:52 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-27 13:42:21 +0200
commit7ce9e8f152149e8365ea48201b00019a34e11c64 (patch)
treee1ff2722c55bcfdb85654b3d67435ae2faa6d8e8 /libempathy
parentfabd83a72b86ef04a61a5b89493214f4e317bb27 (diff)
downloadempathy-7ce9e8f152149e8365ea48201b00019a34e11c64.tar.gz
ft-factory: ensure that the factory stays alive while empathy_ft_handler_new_outgoing() is running
https://bugzilla.gnome.org/show_bug.cgi?id=678524
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-ft-factory.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libempathy/empathy-ft-factory.c b/libempathy/empathy-ft-factory.c
index 10c8bea08..2c213b050 100644
--- a/libempathy/empathy-ft-factory.c
+++ b/libempathy/empathy-ft-factory.c
@@ -225,9 +225,11 @@ ft_handler_outgoing_ready_cb (EmpathyFTHandler *handler,
GError *error,
gpointer user_data)
{
- EmpathyFTFactory *factory = user_data;
+ EmpathyFTFactory *factory = EMPATHY_FT_FACTORY (user_data);
g_signal_emit (factory, signals[NEW_FT_HANDLER], 0, handler, error);
+
+ g_object_unref (factory);
}
/* public methods */
@@ -266,7 +268,7 @@ empathy_ft_factory_new_transfer_outgoing (EmpathyFTFactory *factory,
g_return_if_fail (G_IS_FILE (source));
empathy_ft_handler_new_outgoing (contact, source, action_time,
- ft_handler_outgoing_ready_cb, factory);
+ ft_handler_outgoing_ready_cb, g_object_ref (factory));
}
/**