Load the error texture when a texture isn't found instead of just passing null to OpenGL!

This commit is contained in:
2016-03-02 17:42:27 +01:00
parent 03a35d0f5e
commit edf481b4d7
@@ -12,7 +12,7 @@ Texture* CommonFunctions::LoadTexture(std::string path, bool threaded)
} catch (const Resource::StillLoadingException&) {
img = ResourceManager::Load<Texture>("Textures/Core/ErrorTexture.png");
} catch (const std::exception&) {
img = nullptr;
img = ResourceManager::Load<Texture>("Textures/Core/ErrorTexture.png");
}
return img;