1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-12 08:05:18 +02:00

Driver: Change the texture check condition

The return value of 'ensureTexture' is unsuited for the texture "".
This fixes an undesired side-effect introduced by 9213b7f1.
This commit is contained in:
SmallJoker
2025-10-11 22:16:09 +02:00
parent 9213b7f164
commit 0b13fd0b01

View File

@@ -85,8 +85,8 @@ void TextureBuffer::reset(PipelineContext &context)
// change textures to match definitions
for (u32 i = 0; i < m_definitions.size(); i++) {
video::ITexture **ptr = &m_textures[i];
if (!ensureTexture(ptr, m_definitions[i], context)) {
ensureTexture(ptr, m_definitions[i], context);
if (m_definitions[i].valid && !*ptr) {
throw ShaderException(
fmtgettext("Failed to create the texture \"%s\" for the rendering pipeline.",
m_definitions[i].name.c_str()) +