Invalidate taglist userdata

This commit is contained in:
James R 2020-12-05 02:26:00 -08:00
parent 5d1040c924
commit 0b0f2e1e35
2 changed files with 6 additions and 1 deletions

View file

@ -846,6 +846,7 @@ void LUA_InvalidateLevel(void)
{
LUA_InvalidateUserdata(&sectors[i]);
LUA_InvalidateUserdata(&sectors[i].lines);
LUA_InvalidateUserdata(&sectors[i].tags);
if (sectors[i].ffloors)
{
for (rover = sectors[i].ffloors; rover; rover = rover->next)
@ -855,6 +856,7 @@ void LUA_InvalidateLevel(void)
for (i = 0; i < numlines; i++)
{
LUA_InvalidateUserdata(&lines[i]);
LUA_InvalidateUserdata(&lines[i].tags);
LUA_InvalidateUserdata(lines[i].sidenum);
}
for (i = 0; i < numsides; i++)
@ -886,7 +888,10 @@ void LUA_InvalidateMapthings(void)
return;
for (i = 0; i < nummapthings; i++)
{
LUA_InvalidateUserdata(&mapthings[i]);
LUA_InvalidateUserdata(&mapthings[i].tags);
}
}
void LUA_InvalidatePlayer(player_t *player)

View file

@ -182,7 +182,7 @@ static taglist_t * valid_taglist(lua_State *L, int idx, boolean getting)
if (getting && has_valid_field(L))
lua_pushboolean(L, 0);
else
LUA_ErrInvalid(L, "taglist_t");/* doesn't actually return */
LUA_ErrInvalid(L, "taglist");/* doesn't actually return */
return NULL;
}
else