Fix Lua being able to crash the game by removing an Mobj with MobjSpawn
This commit is contained in:
parent
9f8d2d9296
commit
83fdcd00c0
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue