From a388b6c8ab147b60388a76e4fa8b7080ef4c2618 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 31 Oct 2018 23:22:28 +0100 Subject: [PATCH] - added missing nullptr check. --- src/hwrenderer/scene/hw_sprites.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hwrenderer/scene/hw_sprites.cpp b/src/hwrenderer/scene/hw_sprites.cpp index 35c492d96c..4bda3ab718 100644 --- a/src/hwrenderer/scene/hw_sprites.cpp +++ b/src/hwrenderer/scene/hw_sprites.cpp @@ -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)