fix crash when playing some demos
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 4 Apr 2009 20:01:58 +0000 (20:01 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 4 Apr 2009 20:01:58 +0000 (20:01 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8861 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c

index 80d11ef..7f0704c 100644 (file)
@@ -992,6 +992,8 @@ void CL_BeginDownloads(qboolean aborteddownload)
 
        // if we got here...
        // curl is done, so let's start with the business
+       if(!cl.loadbegun)
+               SCR_PushLoadingScreen(false, "Loading precaches", 1);
        cl.loadbegun = true;
 
        // if already downloading something from the previous level, don't stop it
@@ -1214,10 +1216,7 @@ void CL_BeginDownloads_f(void)
        if(cl.loadbegun)
                Con_Printf("cl_begindownloads is only valid once per match\n");
        else
-       {
-               SCR_PushLoadingScreen(false, "Loading precaches", 1);
                CL_BeginDownloads(false);
-       }
 }
 
 void CL_StopDownload(int size, int crc)
@@ -1448,10 +1447,7 @@ static void CL_SignonReply (void)
                        //MSG_WriteString (&cls.netcon->message, "prespawn");
                }
                else // playing a demo...  make sure loading occurs as soon as possible
-               {
-                       SCR_PushLoadingScreen(false, "Loading precaches", 1);
                        CL_BeginDownloads(false);
-               }
                break;
 
        case 2: