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>2013-09-29 17:38:56 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-09-29 17:38:56 +0400
commitaf915b443a24ec0ff5fa1d094157716080fe3424 (patch)
tree6c5fc6587acf21e7d4f38f740c3a21b07317b604 /source/blender/blenkernel/intern/rigidbody.c
parent4829cf9cd008d6c14b0f3cd5ef816064f404ed25 (diff)
Fix [#36847] If Force Field in Ridgid Body group, crash at first frame of animation on playback
Not all objects in RB group actually have a "rigid body object", needs to be checked.
Diffstat (limited to 'source/blender/blenkernel/intern/rigidbody.c')
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index f3276992381..42147be33e4 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -1166,7 +1166,7 @@ static void rigidbody_update_simulation_post_step(RigidBodyWorld *rbw)
if (ob) {
RigidBodyOb *rbo = ob->rigidbody_object;
/* reset kinematic state for transformed objects */
- if (ob->flag & SELECT && G.moving & G_TRANSFORM_OBJ) {
+ if (rbo && (ob->flag & SELECT) && (G.moving & G_TRANSFORM_OBJ)) {
RB_body_set_kinematic_state(rbo->physics_object, rbo->flag & RBO_FLAG_KINEMATIC || rbo->flag & RBO_FLAG_DISABLED);
RB_body_set_mass(rbo->physics_object, RBO_GET_MASS(rbo));
/* deactivate passive objects so they don't interfere with deactivation of active objects */