From edf481b4d785e1b61046a19ef552c521778a7b53 Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Wed, 2 Mar 2016 17:42:27 +0100 Subject: [PATCH] Load the error texture when a texture isn't found instead of just passing null to OpenGL! --- src/Engine/Rendering/Util/CommonFunctions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Engine/Rendering/Util/CommonFunctions.cpp b/src/Engine/Rendering/Util/CommonFunctions.cpp index 913e005e..51529a72 100644 --- a/src/Engine/Rendering/Util/CommonFunctions.cpp +++ b/src/Engine/Rendering/Util/CommonFunctions.cpp @@ -12,7 +12,7 @@ Texture* CommonFunctions::LoadTexture(std::string path, bool threaded) } catch (const Resource::StillLoadingException&) { img = ResourceManager::Load("Textures/Core/ErrorTexture.png"); } catch (const std::exception&) { - img = nullptr; + img = ResourceManager::Load("Textures/Core/ErrorTexture.png"); } return img;