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.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user