]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
patch from div0 to fix a segfault in curl support when canceling a file that isn...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 12 Nov 2006 12:55:06 +0000 (12:55 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 12 Nov 2006 12:55:06 +0000 (12:55 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6618 d7cf8633-e32d-0410-b094-e92efae38249

libcurl.c

index 42c407ff4d4a3ff8d74817588e8877f09a6e6850..ce5bf5e31b012cd5bb676a22d1ad089b28cc3ed0 100644 (file)
--- 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;
                }