Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-01-21 11:05:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-21 11:07:57 +0300
commit7bc9a563e65842629a98f0655578e1e4f8c8c960 (patch)
tree73e192add26983b8755dcab3d0f18aae39d7c79c /source/blender/draw/modes
parent7117dfaf6717a642e5d4fcfc8205bf540d207f75 (diff)
Correct freeing builtin shader from recent commit
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r--source/blender/draw/modes/edit_mesh_mode.c4
1 files changed, 3 insertions, 1 deletions
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]);
}