From 20bf4d6c8ebe8cf4bc3fedf24e9a609843a8b5b3 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 21 Nov 2015 17:43:49 +0200 Subject: [PATCH] Fixed crash on finishgame CCMD in non-game modes http://forum.zdoom.org/viewtopic.php?t=49943 --- src/g_level.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/g_level.cpp b/src/g_level.cpp index 15d88ccaf..aba58e810 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -698,6 +698,13 @@ void G_DoCompleted (void) gameaction = ga_nothing; + if ( gamestate == GS_DEMOSCREEN + || gamestate == GS_FULLCONSOLE + || gamestate == GS_STARTUP) + { + return; + } + if (gamestate == GS_TITLELEVEL) { level.MapName = nextlevel;