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
path: root/source
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-04-28 22:58:52 +0300
committerHans Goudey <h.goudey@me.com>2022-04-28 22:58:52 +0300
commit8095875dffebed289791491ff15d68d49deb85ef (patch)
tree0204727ca0998419dff6f2535bd3b7e3468d532b /source
parent4b7ed584a83d676a3c191b1479611cf1fff8db85 (diff)
Fix T97151: Curve vertex parenting crash with dependency cycle
When the object's position depends on the geometry and the geometry depends on the object's position, we can't count on the object's evaluated geometry to be available. Lattices and mesh objects have equivalent checks in this vertex parenting function. Differential Revision: https://developer.blender.org/D14781
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/object.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc
index 948064ad170..ddaae7a14d0 100644
--- a/source/blender/blenkernel/intern/object.cc
+++ b/source/blender/blenkernel/intern/object.cc
@@ -3256,10 +3256,9 @@ static void give_parvert(Object *par, int nr, float vec[3])
else if (ELEM(par->type, OB_CURVES_LEGACY, OB_SURF)) {
ListBase *nurb;
- /* Unless there's some weird depsgraph failure the cache should exist. */
- BLI_assert(par->runtime.curve_cache != nullptr);
-
- if (par->runtime.curve_cache->deformed_nurbs.first != nullptr) {
+ /* It is possible that a cycle in the dependency graph was resolved in a way that caused this
+ * object to be evaluated before its dependencies. In this case the curve cache may be null. */
+ if (par->runtime.curve_cache && par->runtime.curve_cache->deformed_nurbs.first != nullptr) {
nurb = &par->runtime.curve_cache->deformed_nurbs;
}
else {