Merge branch 'precip-bad-access' into 'next'

Fix potential crash with precipitation in OpenGL

See merge request STJr/SRB2!1249
This commit is contained in:
James R 2020-11-14 18:33:58 -05:00
commit 11bb835a45

View file

@ -4204,12 +4204,7 @@ static inline void HWR_DrawPrecipitationSprite(gl_vissprite_t *spr)
HWR_Lighting(&Surf, lightlevel, colormap);
}
if (spr->mobj->flags2 & MF2_SHADOW)
{
Surf.PolyColor.s.alpha = 0x40;
blend = PF_Translucent;
}
else if (spr->mobj->frame & FF_TRANSMASK)
if (spr->mobj->frame & FF_TRANSMASK)
blend = HWR_TranstableToAlpha((spr->mobj->frame & FF_TRANSMASK)>>FF_TRANSSHIFT, &Surf);
else
{