- added missing nullptr check.

This commit is contained in:
Christoph Oelckers 2018-10-31 23:22:28 +01:00
parent a6cdcab128
commit a388b6c8ab
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ void GLSprite::DrawSprite(HWDrawInfo *di, FRenderState &state, bool translucent)
{
state.AlphaFunc(Alpha_GEqual, 0.f);
}
else if (!gltexture->tex->GetTranslucency()) state.AlphaFunc(Alpha_GEqual, gl_mask_sprite_threshold);
else if (!gltexture || !gltexture->tex->GetTranslucency()) state.AlphaFunc(Alpha_GEqual, gl_mask_sprite_threshold);
else state.AlphaFunc(Alpha_Greater, 0.f);
if (RenderStyle.BlendOp == STYLEOP_Shadow)