Fix Lua being able to crash the game by removing an Mobj with MobjSpawn

This commit is contained in:
NepDisk 2026-04-11 12:28:14 -04:00
parent 9f8d2d9296
commit 83fdcd00c0

View file

@ -14013,6 +14013,10 @@ static mobj_t *P_SpawnMobjFromMapThing(mapthing_t *mthing, fixed_t x, fixed_t y,
size_t arg = SIZE_MAX;
mobj = P_SpawnMobj(x, y, z, i);
if (mobj == NULL || P_MobjWasRemoved(mobj))
return NULL;
mobj->spawnpoint = mthing;
if (doangle)