From 2ed722f329b27db0ff1026a1a41fde0153b4d094 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 18 Oct 2019 19:29:35 +0200 Subject: [PATCH] - do not draw invalid textures. --- source/build/src/texcache.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/build/src/texcache.cpp b/source/build/src/texcache.cpp index 84d08aae7..8de658619 100644 --- a/source/build/src/texcache.cpp +++ b/source/build/src/texcache.cpp @@ -124,6 +124,7 @@ FHardwareTexture* GLInstance::LoadTexture(FTexture* tex, int textype, int palid) bool GLInstance::SetTextureInternal(FTexture* tex, int palette, int method, int sampleroverride, float xpanning, float ypanning, FTexture *det, float detscale, FTexture *glow) { + if (tex->GetWidth() <= 0 || tex->GetHeight() <= 0) return false; int usepalette = fixpalette >= 1 ? fixpalette - 1 : curbasepal; int usepalswap = fixpalswap >= 1 ? fixpalswap - 1 : palette; GLInterface.SetPalette(usepalette);