changeset 30067:ccae796bdbad

Ref the slplink before destroying the DC, or we might lose our slpcall.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 17 May 2010 08:45:46 +0000
parents 28f774432954
children dbe96260108c
files libpurple/protocols/msn/directconn.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/directconn.c	Mon May 17 08:42:51 2010 +0000
+++ b/libpurple/protocols/msn/directconn.c	Mon May 17 08:45:46 2010 +0000
@@ -316,6 +316,7 @@
 void
 msn_dc_fallback_to_p2p(MsnDirectConn *dc)
 {
+	MsnSlpLink *slplink;
 	MsnSlpCall *slpcall;
 
 	purple_debug_info("msn", "msn_dc_try_fallback_to_p2p %p\n", dc);
@@ -323,11 +324,13 @@
 	g_return_if_fail(dc != NULL);
 
 	slpcall = dc->slpcall;
+	slplink = msn_slplink_ref(dc->slplink);
 
 	msn_dc_destroy(dc);
 
 	if (slpcall)
 		msn_slpcall_session_init(slpcall);
+	msn_slplink_unref(slplink);
 }
 
 static void