diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-02-03 17:39:49 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-02-03 17:42:27 +0400 |
commit | 3d8c1068baf4e2e2d8b40d3dd030c04e0783d117 (patch) | |
tree | e604830aaa75a10bf89a33bd27142924dac8774e /source/blender/blenkernel | |
parent | 037d5228a1df93a9e6dfba320593792f667014b2 (diff) |
Fix T38420: Segfault when curve deform modifier and cyclic dependency
Crash was caused by missing curve_cache due to cyclic dependency.
This commit is rather a workaround, but we couldn't really guarantee
proper behavior in cases with cyclic dependency. So rather than calling
object update directly as it used to be let's don't perform curve
deform and be safe for threading instead.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/lattice.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index 8b509c77155..dfab5a0bb26 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -623,8 +623,8 @@ static int calc_curve_deform(Object *par, float co[3], const bool is_neg_axis = (axis > 2); /* to be sure, mostly after file load */ - if (par->curve_cache->path == NULL) { - return 0; // happens on append... + if (ELEM(NULL, par->curve_cache, par->curve_cache->path)) { + return 0; // happens on append and cyclic dependencies... } /* options */ |