From 8e00b760361487a2ae98a83414bba3f5e493862c Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Wed, 23 Sep 2015 16:50:49 +0200 Subject: [PATCH] Error texture for texture frames when texture is missing --- include/GUI/TextureFrame.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/GUI/TextureFrame.h b/include/GUI/TextureFrame.h index e177f5e..18b2b3a 100644 --- a/include/GUI/TextureFrame.h +++ b/include/GUI/TextureFrame.h @@ -48,6 +48,9 @@ public: void SetTexture(std::string resourceName) { m_Texture = ResourceManager::Load(resourceName); + if (m_Texture == nullptr) { + m_Texture = ResourceManager::Load("Textures/Core/ErrorTexture.png"); + } } void FadeToTexture(std::string resourceName, double duration)