diff --git a/src/g_demo.c b/src/g_demo.c index 70ac4237f..f828d0343 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -2794,6 +2794,16 @@ void G_DoPlayDemo(char *defdemoname) #endif demobuf.p += 4; // Extrainfo location + // ...*map* not loaded? + if (!gamemap || (gamemap > NUMMAPS) || !mapheaderinfo[gamemap-1] || !(mapheaderinfo[gamemap-1]->menuflags & LF2_EXISTSHACK)) + { + snprintf(msg, 1024, M_GetText("%s features a course that is not currently loaded.\n"), pdemoname); + CONS_Alert(CONS_ERROR, "%s", msg); + M_StartMessage(msg, M_ReturnToTitleFromError, MM_EVENTHANDLER); + G_ResetDemoPlayback(); + return; + } + #ifdef DEMO_COMPAT_100 if (demo.version == 0x0001) { @@ -2826,16 +2836,6 @@ void G_DoPlayDemo(char *defdemoname) return; } - // ...*map* not loaded? - if (!gamemap || (gamemap > NUMMAPS) || !mapheaderinfo[gamemap-1] || !(mapheaderinfo[gamemap-1]->menuflags & LF2_EXISTSHACK)) - { - snprintf(msg, 1024, M_GetText("%s features a course that is not currently loaded.\n"), pdemoname); - CONS_Alert(CONS_ERROR, "%s", msg); - M_StartMessage(msg, M_ReturnToTitleFromError, MM_EVENTHANDLER); - G_ResetDemoPlayback(); - return; - } - // Set color for (i = 0; i < MAXSKINCOLORS; i++) {