diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-06-21 18:42:52 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-06-26 17:16:26 +0800 |
commit | 9b18c84ccde2ff7231baddab7dd53403fc4df2d9 (patch) | |
tree | 6382b7d3e0170b021d9d0f70c129a947683844f1 /libempathy | |
parent | 8d84c1728f9b1e5e41a281b6e8b1ee12020e18b0 (diff) | |
download | gsoc2013-empathy-9b18c84ccde2ff7231baddab7dd53403fc4df2d9.tar.gz gsoc2013-empathy-9b18c84ccde2ff7231baddab7dd53403fc4df2d9.tar.zst gsoc2013-empathy-9b18c84ccde2ff7231baddab7dd53403fc4df2d9.zip |
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.c | 6 |
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)); } /** |