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);