From: divverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Date: Wed, 4 Mar 2015 11:49:12 +0000 (+0000)
Subject: Fix NULL crash in QW_CL_RequestNextDownload without connection.
X-Git-Tag: xonotic-v0.8.1~8^2~24
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e3f0be4a467683a4900fd774e9206516269e22ae;p=xonotic%2Fdarkplaces.git

Fix NULL crash in QW_CL_RequestNextDownload without connection.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12179 d7cf8633-e32d-0410-b094-e92efae38249
---

diff --git a/cl_parse.c b/cl_parse.c
index 2828515f..26a0ed11 100644
--- a/cl_parse.c
+++ b/cl_parse.c
@@ -586,6 +586,12 @@ static void QW_CL_RequestNextDownload(void)
 	// clear name of file that just finished
 	cls.qw_downloadname[0] = 0;
 
+	// skip the download fragment if playing a demo
+	if (!cls.netcon)
+	{
+		return;
+	}
+
 	switch (cls.qw_downloadtype)
 	{
 	case dl_single: