turn assert into if

This commit is contained in:
Ricardo Luís Vaz Silva 2025-08-07 18:34:48 -03:00
commit 439d09059e

View file

@ -671,9 +671,10 @@ void FDynamicLight::UnlinkLight()
auto sidedef = touchlists.wall_tlist[i];
if (!sidedef) continue;
assert(Level->lightlists.wall_dlist.SSize() < sidedef->Index());
Level->lightlists.wall_dlist[sidedef->Index()].Remove(this);
if(Level->lightlists.wall_dlist.SSize() < sidedef->Index())
{
Level->lightlists.wall_dlist[sidedef->Index()].Remove(this);
}
}
for(int i = 0; i < touchlists.flat_tlist.SSize(); i++)
@ -681,9 +682,10 @@ void FDynamicLight::UnlinkLight()
auto sec = touchlists.flat_tlist[i];
if (!sec) continue;
assert(Level->lightlists.flat_dlist.SSize() < sec->Index());
Level->lightlists.flat_dlist[sec->Index()].Remove(this);
if(Level->lightlists.flat_dlist.SSize() < sec->Index())
{
Level->lightlists.flat_dlist[sec->Index()].Remove(this);
}
}
touchlists.flat_tlist.Clear();