From c3a73efa8df65e6bcbf37e5dc2cd5606dc09778a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Ko=C5=82odziejski?= Date: Sat, 1 Jan 2022 17:38:48 +0100 Subject: [PATCH] TINYGL: No need to check for current_texture --- graphics/tinygl/zdirtyrect.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/graphics/tinygl/zdirtyrect.cpp b/graphics/tinygl/zdirtyrect.cpp index fcf2f32f95b..4dea70e3cc5 100644 --- a/graphics/tinygl/zdirtyrect.cpp +++ b/graphics/tinygl/zdirtyrect.cpp @@ -473,10 +473,7 @@ RasterizationDrawCall::RasterizationState RasterizationDrawCall::captureState() state.wrapS = c->texture_wrap_s; state.wrapT = c->texture_wrap_t; state.lightingEnabled = c->lighting_enabled; - if (c->current_texture != nullptr) - state.textureVersion = c->current_texture->versionNumber; - else - state.textureVersion = 0; + state.textureVersion = c->current_texture->versionNumber; memcpy(state.viewportScaling, c->viewport.scale._v, sizeof(c->viewport.scale._v)); memcpy(state.viewportTranslation, c->viewport.trans._v, sizeof(c->viewport.trans._v));