[Bf-blender-cvs] [073a011f91a] blender2.8: Fix T58993: Duplicating after setting a rigid body world crashes Blender.
Bastien Montagne
noreply at git.blender.org
Mon Dec 10 15:10:38 CET 2018
Commit: 073a011f91a52cf1648b2d76606f0f2fff412098
Author: Bastien Montagne
Date: Mon Dec 10 14:10:12 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB073a011f91a52cf1648b2d76606f0f2fff412098
Fix T58993: Duplicating after setting a rigid body world crashes Blender.
There is no guarantee that object in rigidbody collection already have a
valid rgigidbody data when rebuilding deg relations, that is often
generated on-the-fly by actual rigid body simulation.
Note that this can be an issue when generating deg relations I guess...
But at least it won't crash anymore.
===================================================================
M source/blender/depsgraph/intern/builder/deg_builder_relations.cc
===================================================================
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 23f1d229d6a..f66a0a8963a 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1627,7 +1627,7 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
/* Geometry must be known to create the rigid body. RBO_MESH_BASE uses the non-evaluated
* mesh, so then the evaluation is unnecessary. */
- if (object->rigidbody_object->mesh_source != RBO_MESH_BASE) {
+ if (object->rigidbody_object != NULL && object->rigidbody_object->mesh_source != RBO_MESH_BASE) {
ComponentKey geom_key(&object->id, DEG_NODE_TYPE_GEOMETRY);
add_relation(geom_key, init_key, "Object Geom Eval -> Rigidbody Rebuild");
}
More information about the Bf-blender-cvs
mailing list