From: havoc Date: Sun, 12 Nov 2006 12:55:06 +0000 (+0000) Subject: patch from div0 to fix a segfault in curl support when canceling a file that isn... X-Git-Tag: xonotic-v0.1.0preview~3777 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=248a542e88952bcae05f6362cd13bfd326a8b073;p=xonotic%2Fdarkplaces.git patch from div0 to fix a segfault in curl support when canceling a file that isn't being downloaded git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6618 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/libcurl.c b/libcurl.c index 42c407ff..ce5bf5e3 100644 --- a/libcurl.c +++ b/libcurl.c @@ -970,7 +970,10 @@ void Curl_Curl_f(void) else { downloadinfo *di = Curl_Find(url); - Curl_EndDownload(di, CURL_DOWNLOAD_ABORTED, CURLE_OK); + if(di) + Curl_EndDownload(di, CURL_DOWNLOAD_ABORTED, CURLE_OK); + else + Con_Print("download not found\n"); } return; }