MD2 crash fix.

This commit is contained in:
toaster 2019-10-13 11:59:38 +01:00
parent 008f576560
commit 5502242e8b

View file

@ -1277,6 +1277,7 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
// MD2 colormap fix // MD2 colormap fix
// colormap test // colormap test
if (spr->mobj->subsector)
{ {
sector_t *sector = spr->mobj->subsector->sector; sector_t *sector = spr->mobj->subsector->sector;
UINT8 lightlevel = 255; UINT8 lightlevel = 255;
@ -1308,6 +1309,8 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
else else
Surf.FlatColor.rgba = HWR_Lighting(lightlevel, NORMALFOG, FADEFOG, false, false); Surf.FlatColor.rgba = HWR_Lighting(lightlevel, NORMALFOG, FADEFOG, false, false);
} }
else
Surf.FlatColor.rgba = 0xFFFFFFFF;
// Look at HWR_ProjectSprite for more // Look at HWR_ProjectSprite for more
{ {