From e98b69687aad747b3318e3999fcb3b8aff3d045b Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Sun, 31 May 2020 22:26:33 +0000 Subject: [PATCH] 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 --- cl_screen.c | 5 +++++ 1 file changed, 5 insertions(+) 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) -- 2.39.2