change curve evaluation functions never to modify curve data (ensures thread safety...
[blender-staging.git] / source / blender / render / intern / source / convertblender.c
index f34bd352e624dcef7d44e01a98a53cefb554a399..6bd95e824eb02e04511b0fd6b1a752309e2318ef 100644 (file)
@@ -3824,6 +3824,11 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
        lar->ld2= la->att2;
        lar->curfalloff = curvemapping_copy(la->curfalloff);
 
+       if (lar->curfalloff) {
+               /* so threads don't conflict on init */
+               curvemapping_initialize(lar->curfalloff);
+       }
+
        if (lar->type==LA_SPOT) {
 
                normalize_v3(lar->imat[0]);