From 480b22c50eca98383fed42a938cb49d51d6af20d Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Wed, 7 Dec 2016 18:59:48 +0100 Subject: [PATCH] Add more checks for FTexture::TEX_Null --- src/r_poly_sprite.cpp | 2 +- src/r_poly_wallsprite.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/r_poly_sprite.cpp b/src/r_poly_sprite.cpp index c17bc5909f..e5d8e0ce56 100644 --- a/src/r_poly_sprite.cpp +++ b/src/r_poly_sprite.cpp @@ -74,7 +74,7 @@ void RenderPolySprite::Render(const TriMatrix &worldToClip, const Vec4f &clipPla bool flipTextureX = false; FTexture *tex = GetSpriteTexture(thing, flipTextureX); - if (tex == nullptr) + if (tex == nullptr || tex->UseType == FTexture::TEX_Null) return; DVector2 spriteScale = thing->Scale; diff --git a/src/r_poly_wallsprite.cpp b/src/r_poly_wallsprite.cpp index 0521fb06e3..e7fe267b8b 100644 --- a/src/r_poly_wallsprite.cpp +++ b/src/r_poly_wallsprite.cpp @@ -38,7 +38,7 @@ void RenderPolyWallSprite::Render(const TriMatrix &worldToClip, const Vec4f &cli bool flipTextureX = false; FTexture *tex = RenderPolySprite::GetSpriteTexture(thing, flipTextureX); - if (tex == nullptr) + if (tex == nullptr || tex->UseType == FTexture::TEX_Null) return; DVector2 spriteScale = thing->Scale;