diff --git a/src/modules/graphics/opengl/Shader.cpp b/src/modules/graphics/opengl/Shader.cpp index b95a0d10b..6cd08ad3a 100644 --- a/src/modules/graphics/opengl/Shader.cpp +++ b/src/modules/graphics/opengl/Shader.cpp @@ -98,10 +98,9 @@ Shader::~Shader() detach(); for (auto it = boundRetainables.begin(); it != boundRetainables.end(); ++it) - { it->second->release(); - boundRetainables.erase(it); - } + + boundRetainables.clear(); unloadVolatile(); }