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
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-12-10 16:10:12 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-12-10 17:10:29 +0300
commit073a011f91a52cf1648b2d76606f0f2fff412098 (patch)
tree0916ce9af8bf5ff51f6e67dd4223d5f32860a41e /source/blender/depsgraph
parent448731ac92c5fe721c08a4dde343be012b49716d (diff)
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.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc2
1 files changed, 1 insertions, 1 deletions
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");
}