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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-05-08 12:39:45 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-05-08 12:39:45 +0300
commit0411cfea9d8bfcad6271ccec51bc9a9c641c798c (patch)
treee2a2cf4ee43b9c91954f5b3f59365b5a0f832825 /source/blender/blenkernel
parent1955754934425de7a6c51fe71bf79e965035d28f (diff)
Fix T48373: Crash when using dynamic paint with brush material.
`dynamicPaint_doMaterialTex` was called from inside an omp parallel section with brush->dm itself, and not the local dm copy. Generating looptri data is not thread safe at all...
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index dbf095d3832..0da2bb0b1c4 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -3466,8 +3466,11 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
sampleColor[2] = brush->b;
/* Get material+textures color on hit point if required */
- if (brush_usesMaterial(brush, scene))
- dynamicPaint_doMaterialTex(bMats, sampleColor, &alpha_factor, brushOb, bData->realCoord[bData->s_pos[index] + ss].v, hitCoord, hitTri, brush->dm);
+ if (brush_usesMaterial(brush, scene)) {
+ dynamicPaint_doMaterialTex(bMats, sampleColor, &alpha_factor, brushOb,
+ bData->realCoord[bData->s_pos[index] + ss].v,
+ hitCoord, hitTri, dm);
+ }
/* Sample proximity colorband if required */
if ((hit_found == HIT_PROXIMITY) && (brush->proximity_falloff == MOD_DPAINT_PRFALL_RAMP)) {