2
0
Эх сурвалжийг харах

Fixed segfault when garbage collecting Shader objects

Alex Szpakowski 11 жил өмнө
parent
commit
cb01e3f4d1

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