Commit: 7bc9a563e65842629a98f0655578e1e4f8c8c960
Author: Campbell Barton
Date:   Mon Jan 21 19:05:29 2019 +1100
Branches: master
https://developer.blender.org/rB7bc9a563e65842629a98f0655578e1e4f8c8c960

Correct freeing builtin shader from recent commit

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

M       source/blender/draw/modes/edit_mesh_mode.c

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

diff --git a/source/blender/draw/modes/edit_mesh_mode.c 
b/source/blender/draw/modes/edit_mesh_mode.c
index 2f79cf75ebb..dfd4b213c7c 100644
--- a/source/blender/draw/modes/edit_mesh_mode.c
+++ b/source/blender/draw/modes/edit_mesh_mode.c
@@ -864,7 +864,9 @@ static void EDIT_MESH_engine_free(void)
 {
        for (int sh_data_index = 0; sh_data_index < ARRAY_SIZE(e_data.sh_data); 
sh_data_index++) {
                EDIT_MESH_ShaderData *sh_data = &e_data.sh_data[sh_data_index];
-               GPUShader **sh_data_as_array = (GPUShader 
**)&sh_data->weight_face;
+               /* Don't free builtins. */
+               sh_data->depth = NULL;
+               GPUShader **sh_data_as_array = (GPUShader **)sh_data;
                for (int i = 0; i < (sizeof(EDIT_MESH_ShaderData) / 
sizeof(GPUShader *)); i++) {
                        DRW_SHADER_FREE_SAFE(sh_data_as_array[i]);
                }

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

Reply via email to