mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-24 19:52:08 +00:00
Merge branch 'fix-segfault-remove-thinglist' into 'next'
Fix segfault when removing mobjs while iterating thinglist See merge request STJr/SRB2!2293
This commit is contained in:
commit
0c59a46d5a
1 changed files with 2 additions and 0 deletions
|
@ -486,6 +486,8 @@ static int lib_iterateSectorThinglist(lua_State *L)
|
|||
if (!lua_isnil(L, 1))
|
||||
{
|
||||
thing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||
if (P_MobjWasRemoved(thing))
|
||||
return luaL_error(L, "current entry in thinglist was removed; avoid calling P_RemoveMobj on entries!");
|
||||
thing = thing->snext;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue