Swap two lines to fix a crash.

Sun, 11 Oct 2009 19:20:44 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Sun, 11 Oct 2009 19:20:44 +0000
changeset 28658
107811b9dda7
parent 28657
57fbfb8905c2
child 28664
a57f48080272

Swap two lines to fix a crash.

msn_servconn_disconnect can destroy servconn, which makes it crash on the
next line. So reset the idle-handler before going into that function.

libpurple/protocols/msn/servconn.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/msn/servconn.c	Sat Oct 10 19:47:30 2009 +0000
+++ b/libpurple/protocols/msn/servconn.c	Sun Oct 11 19:20:44 2009 +0000
@@ -299,8 +299,8 @@
 static gboolean
 servconn_idle_timeout_cb(MsnServConn *servconn)
 {
+	servconn->timeout_handle = 0;
 	msn_servconn_disconnect(servconn);
-	servconn->timeout_handle = 0;	/* XXX: servconn may not be valid anymore */
 	return FALSE;
 }
 

mercurial