From 76f9907288cdfef9c4be26a05141312cea71cb3a Mon Sep 17 00:00:00 2001 From: Ashnal Date: Sat, 15 Feb 2020 20:34:23 -0500 Subject: [PATCH] Fix debug build crash This was tryign to =check the thinker list on the titlescreen befoire any thinkers exist --- src/d_clisrv.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 82d82ef94..1e6904a4f 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -4778,12 +4778,14 @@ static INT16 Consistancy(void) ret += P_GetRandSeed(); #ifdef MOBJCONSISTANCY - for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) + if (gamestate == GS_LEVEL) { - if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed) - continue; + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) + { + if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed) + continue; - mo = (mobj_t *)th; + mo = (mobj_t *)th; if (mo->flags & (MF_SPECIAL | MF_SOLID | MF_PUSHABLE | MF_BOSS | MF_MISSILE | MF_SPRING | MF_MONITOR | MF_FIRE | MF_ENEMY | MF_PAIN | MF_STICKY)) { @@ -4884,6 +4886,7 @@ static INT16 Consistancy(void) ret -= mo->sprite; ret += mo->frame; } + } } #endif