From: cloudwalk Date: Sun, 31 May 2020 22:26:33 +0000 (+0000) Subject: Don't let envmap run if we're not in-game. Fixes crash X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e98b69687aad747b3318e3999fcb3b8aff3d045b;p=xonotic%2Fdarkplaces.git Don't let envmap run if we're not in-game. Fixes crash git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12617 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_screen.c b/cl_screen.c index f6ca6e1c..66c50058 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -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)