changeset 25407:651cdeab9b99

conn->current_request can be NULL here.
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 02 Feb 2009 16:13:11 +0000
parents e6683ec9d310
children e316de5f75a3 0f2503390a6b
files libpurple/protocols/msn/soap.c
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/soap.c	Sun Feb 01 09:14:24 2009 +0000
+++ b/libpurple/protocols/msn/soap.c	Mon Feb 02 16:13:11 2009 +0000
@@ -342,12 +342,14 @@
 	}
 
 	if (fault || body) {
-		MsnSoapRequest *request = conn->current_request;
-		conn->current_request = NULL;
-		request->cb(request->message, response,
-			request->cb_data);
+		if (conn->current_request) {
+			MsnSoapRequest *request = conn->current_request;
+			conn->current_request = NULL;
+			request->cb(request->message, response,
+				request->cb_data);
+			msn_soap_request_destroy(request, FALSE);
+		}
 		msn_soap_message_destroy(response);
-		msn_soap_request_destroy(request, FALSE);
 	}
 
 	return TRUE;