mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-31 05:30:48 +00:00
Merge branch 'fix-mobj-skin-segfault' into 'next'
Fix segfault when accessing skin from lua on a delayed removal See merge request STJr/SRB2!2558
This commit is contained in:
commit
9c74a73e57
1 changed files with 2 additions and 2 deletions
|
@ -198,12 +198,12 @@ static int mobj_get(lua_State *L)
|
|||
enum mobj_e field = Lua_optoption(L, 2, -1, mobj_fields_ref);
|
||||
lua_settop(L, 2);
|
||||
|
||||
if (!mo || !ISINLEVEL) {
|
||||
if (P_MobjWasRemoved(mo) || !ISINLEVEL) {
|
||||
if (field == mobj_valid) {
|
||||
lua_pushboolean(L, 0);
|
||||
return 1;
|
||||
}
|
||||
if (!mo) {
|
||||
if (P_MobjWasRemoved(mo)) {
|
||||
return LUA_ErrInvalid(L, "mobj_t");
|
||||
} else
|
||||
return luaL_error(L, "Do not access an mobj_t field outside a level!");
|
||||
|
|
Loading…
Reference in a new issue