[Bf-blender-cvs] [c982e62128b] soc-2017-sculpting_improvements: Fixed a crasher, mutex was missing initialisation.

Sebastian Witt noreply at git.blender.org
Mon Aug 28 17:35:57 CEST 2017


Commit: c982e62128b5283151c90ab07263437dcfc15868
Author: Sebastian Witt
Date:   Mon Aug 28 17:34:34 2017 +0200
Branches: soc-2017-sculpting_improvements
https://developer.blender.org/rBc982e62128b5283151c90ab07263437dcfc15868

Fixed a crasher, mutex was missing initialisation.

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

M	source/blender/editors/sculpt_paint/sculpt.c

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

diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index dc43e67896d..8f379790919 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -7468,10 +7468,14 @@ static void check_preceding_intersecting_edges(Object *ob, SilhouetteData *sil,
 	TIMEIT_START(parallel_intersect);
 #endif
 
+	BLI_mutex_init(&data.mutex);
+
 	BLI_task_parallel_range_ex(
 							   0, sil->num_inter_nodes, &data, NULL, 0, do_calc_sil_intersect_task_cb_ex,
 							   (sil->num_inter_nodes > SCULPT_THREADED_LIMIT), false);
 
+	BLI_mutex_end(&data.mutex);
+
 #ifdef DEBUG_TIME
 	TIMEIT_END(parallel_intersect);
 #endif
@@ -9183,10 +9187,14 @@ static void do_calc_fillet_line(Object *ob, SilhouetteData *sil, PBVHNode **node
 		.sil = sil, .mat = projmat
 	};
 
+	BLI_mutex_init(&data.mutex);
+
 	BLI_task_parallel_range_ex(
 							   0, totnode, &data, NULL, 0, do_calc_fillet_line_task_cb_ex,
 							   (totnode > SCULPT_THREADED_LIMIT), false);
 
+	BLI_mutex_end(&data.mutex);
+
 	/* sil->l1_vert_hash now contains the interior vertices of the original geometry.
 	 isect_chunk contains only the edgehashes which cross interior and exterior verts. Now generate edgrings from this.*/
 	find_edgering_hash(me, sil,



More information about the Bf-blender-cvs mailing list