diff options
author | Eion Robb <eion@robbmob.com> | 2017-10-24 06:23:56 +0300 |
---|---|---|
committer | Eion Robb <eion@robbmob.com> | 2017-10-24 06:23:56 +0300 |
commit | d0a426776aac0e62520da611d51f44964491b5f9 (patch) | |
tree | 6d9d17babc1de31da2ca6d70b7cba0e3a63d3e35 /skypeweb | |
parent | 0a276c20d4440ea6a2e0de4b82b4dd1c7e0e39a8 (diff) |
Fix rare crash when http connections are cancelled unexpectedly
Diffstat (limited to 'skypeweb')
-rw-r--r-- | skypeweb/purple2compat/http.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/skypeweb/purple2compat/http.c b/skypeweb/purple2compat/http.c index dc44655..df957d2 100644 --- a/skypeweb/purple2compat/http.c +++ b/skypeweb/purple2compat/http.c @@ -1719,7 +1719,9 @@ void purple_http_conn_cancel(PurpleHttpConnection *http_conn) http_conn); } - http_conn->response->code = 0; + if (http_conn->response) { + http_conn->response->code = 0; + } _purple_http_disconnect(http_conn, FALSE); purple_http_connection_terminate(http_conn); } @@ -1732,7 +1734,9 @@ purple_http_conn_retry(PurpleHttpConnection *http_conn) purple_debug_info("http", "Retrying connection %p...\n", http_conn); - http_conn->response->code = 0; + if (http_conn->response) { + http_conn->response->code = 0; + } _purple_http_disconnect(http_conn, FALSE); _purple_http_reconnect(http_conn); } |