diff options
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_runtime.c')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_runtime.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/mesh_runtime.c b/source/blender/blenkernel/intern/mesh_runtime.c index 45c84ed0862..39dbd7d66a4 100644 --- a/source/blender/blenkernel/intern/mesh_runtime.c +++ b/source/blender/blenkernel/intern/mesh_runtime.c @@ -53,6 +53,8 @@ static void mesh_runtime_init_mutexes(Mesh *mesh) { mesh->runtime.eval_mutex = MEM_mallocN(sizeof(ThreadMutex), "mesh runtime eval_mutex"); BLI_mutex_init(mesh->runtime.eval_mutex); + mesh->runtime.normals_mutex = MEM_mallocN(sizeof(ThreadMutex), "mesh runtime normals_mutex"); + BLI_mutex_init(mesh->runtime.normals_mutex); mesh->runtime.render_mutex = MEM_mallocN(sizeof(ThreadMutex), "mesh runtime render_mutex"); BLI_mutex_init(mesh->runtime.render_mutex); } @@ -67,6 +69,11 @@ static void mesh_runtime_free_mutexes(Mesh *mesh) MEM_freeN(mesh->runtime.eval_mutex); mesh->runtime.eval_mutex = NULL; } + if (mesh->runtime.normals_mutex != NULL) { + BLI_mutex_end(mesh->runtime.normals_mutex); + MEM_freeN(mesh->runtime.normals_mutex); + mesh->runtime.normals_mutex = NULL; + } if (mesh->runtime.render_mutex != NULL) { BLI_mutex_end(mesh->runtime.render_mutex); MEM_freeN(mesh->runtime.render_mutex); |