Commit: dabbe6eb22035e8531cf3dee536187864b58356f
Author: Julian Eisel
Date:   Mon Oct 24 00:03:55 2016 +0200
Branches: blender2.8
https://developer.blender.org/rBdabbe6eb22035e8531cf3dee536187864b58356f

Fix memory leak when using depth-only shader

===================================================================

M       source/blender/gpu/intern/gpu_shader.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_shader.c 
b/source/blender/gpu/intern/gpu_shader.c
index f84b2be..9d1c3b0 100644
--- a/source/blender/gpu/intern/gpu_shader.c
+++ b/source/blender/gpu/intern/gpu_shader.c
@@ -982,6 +982,11 @@ void GPU_shader_free_builtin_shaders(void)
                GG.shaders.smooth_color_3D = NULL;
        }
 
+       if (GG.shaders.depth_only_3D) {
+               GPU_shader_free(GG.shaders.depth_only_3D);
+               GG.shaders.depth_only_3D = NULL;
+       }
+
        if (GG.shaders.point_fixed_size_uniform_color_2D) {
                GPU_shader_free(GG.shaders.point_fixed_size_uniform_color_2D);
                GG.shaders.point_fixed_size_uniform_color_2D = NULL;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to