fix a crash when gamemap is not initialized

This may happen when leaving a menu during the title screen when the
first demos hasn't been loaded yet.
This commit is contained in:
Fabian Greffrath 2019-12-27 08:40:10 +01:00
parent 643922d134
commit 95166ee810

View File

@ -514,8 +514,14 @@ void HU_Start(void)
// initialize the automap's level title widget // initialize the automap's level title widget
// [FG] fix crash when gamemap is not initialized
if (gamestate == GS_LEVEL && gamemap > 0)
{
s = gamemode != commercial ? HU_TITLE : gamemission == pack_tnt ? s = gamemode != commercial ? HU_TITLE : gamemission == pack_tnt ?
HU_TITLET : gamemission == pack_plut ? HU_TITLEP : HU_TITLE2; HU_TITLET : gamemission == pack_plut ? HU_TITLEP : HU_TITLE2;
}
else
s = "";
while (*s) while (*s)
HUlib_addCharToTextLine(&w_title, *s++); HUlib_addCharToTextLine(&w_title, *s++);