From 24f65a2560ddbbae4b013fabef90fac081cdb9ed Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 25 Jan 2022 18:18:16 +0100 Subject: [PATCH] Prevented ImageComponent from attempting to render an empty texture. --- es-core/src/components/ImageComponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es-core/src/components/ImageComponent.cpp b/es-core/src/components/ImageComponent.cpp index 885eb6b55..edf18fa96 100644 --- a/es-core/src/components/ImageComponent.cpp +++ b/es-core/src/components/ImageComponent.cpp @@ -384,7 +384,7 @@ void ImageComponent::updateColors() void ImageComponent::render(const glm::mat4& parentTrans) { - if (!isVisible()) + if (!isVisible() || mTexture == nullptr || mTargetSize == glm::vec2 {0.0f, 0.0f}) return; glm::mat4 trans {parentTrans * getTransform()};