fix a potential crash in the demo reel

This commit is contained in:
Fabian Greffrath 2022-02-17 22:02:42 +01:00
parent 28f0d25c3f
commit 3ca81eb4b9

View File

@ -543,7 +543,7 @@ void D_DoAdvanceDemo(void)
demosequence = 0;
// [FG] the BFG Edition IWADs have no TITLEPIC lump, use DMENUPIC instead
name = demostates[demosequence][gamemode].name;
if (!strcasecmp(name, "TITLEPIC") && W_CheckNumForName(name) < 0)
if (name && !strcasecmp(name, "TITLEPIC") && W_CheckNumForName(name) < 0)
{
name = "DMENUPIC";
if (W_CheckNumForName(name) < 0)