diff --git a/src/p_mobj.c b/src/p_mobj.c index d5f281edd..12653d39d 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -11374,6 +11374,12 @@ void P_SpawnMapThing(mapthing_t *mthing) } mobj = P_SpawnMobj(x, y, z, i); + + if (!mobj || P_MobjWasRemoved(mobj)) { + CONS_Alert(CONS_WARNING, "Failed to spawn map thing #%d at %d, %d\n", mthing->type, x>>FRACBITS, y>>FRACBITS); + return; + } + mobj->spawnpoint = mthing; switch(mobj->type)