Prevented ImageComponent from attempting to render an empty texture.

This commit is contained in:
Leon Styhre 2022-01-25 18:18:16 +01:00
parent dc20a9e21b
commit 24f65a2560

View file

@ -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()};