From 3d8c1068baf4e2e2d8b40d3dd030c04e0783d117 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 3 Feb 2014 19:39:49 +0600 Subject: 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. --- source/blender/blenkernel/intern/lattice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/lattice.c') 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 */ -- cgit v1.2.3