Explorar el Código

Fixed segfault when garbage collecting Shader objects

Alex Szpakowski hace 11 años
padre
commit
cb01e3f4d1
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  1. 2 3
      src/modules/graphics/opengl/Shader.cpp

+ 2 - 3
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();
 }