/pidgin/main: 9605c0a2839e: Don't crash when cancelling non-exis...

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Sun Oct 21 19:27:35 EDT 2012


Changeset: 9605c0a2839e45db17956dce504a31c6170a94e5
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2012-10-22 01:27 +0200
Branch:	 default
URL: http://hg.pidgin.im/pidgin/main/rev/9605c0a2839e

Description:

Don't crash when cancelling non-existent HTTP connection

diffstat:

 libpurple/http.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff --git a/libpurple/http.c b/libpurple/http.c
--- a/libpurple/http.c
+++ b/libpurple/http.c
@@ -1274,6 +1274,9 @@ static void purple_http_connection_termi
 
 void purple_http_conn_cancel(PurpleHttpConnection *http_conn)
 {
+	if (http_conn == NULL)
+		return;
+
 	http_conn->response->code = 0;
 	_purple_http_disconnect(http_conn);
 	purple_http_connection_terminate(http_conn);



More information about the Commits mailing list