]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Don't let envmap run if we're not in-game. Fixes crash
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 31 May 2020 22:26:33 +0000 (22:26 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 31 May 2020 22:26:33 +0000 (22:26 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12617 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c

index f6ca6e1c03c699984d42e52cf9c8ae99b86b10cf..66c50058b4397fc2c4a7cb024a7539c640107ded 100644 (file)
@@ -1820,6 +1820,11 @@ static void R_Envmap_f(cmd_state_t *cmd)
                return;
        }
 
+       if(cls.state != ca_connected) {
+               Con_Printf("envmap: No map loaded\n");
+               return;
+       }
+
        strlcpy (basename, Cmd_Argv(cmd, 1), sizeof (basename));
        size = atoi(Cmd_Argv(cmd, 2));
        if (size != 128 && size != 256 && size != 512 && size != 1024)