From b0895fe0824376c4e4f6d0bf3173e5ff88bc3311 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 20 Apr 2026 14:56:28 +0200 Subject: [PATCH] texture:: loadTextureGL now fails if no actual texture is present --- textures.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/textures.cpp b/textures.cpp index 30f59b72..da7e6fcc 100644 --- a/textures.cpp +++ b/textures.cpp @@ -210,6 +210,7 @@ template void scale_colorarray(int origdim, int targetdim, con bool texture_data::loadTextureGL() { + if(!twidth || !theight) return false; if(textureid == 0) glGenTextures(1, &textureid); glBindTexture( GL_TEXTURE_2D, textureid);