Skip to content
Snippets Groups Projects
Commit 0c59a46d authored by sphere's avatar sphere
Browse files

Merge branch 'fix-segfault-remove-thinglist' into 'next'

Fix segfault when removing mobjs while iterating thinglist

See merge request STJr/SRB2!2293
parents 41613d89 21b8acf7
Branches
Tags
2 merge requests!2355fix newer versions of mixerx,!2293Fix segfault when removing mobjs while iterating thinglist
Pipeline #2261 passed
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment