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:
authorSergej Reich <sergej.reich@googlemail.com>2013-02-05 03:50:31 +0400
committerSergej Reich <sergej.reich@googlemail.com>2013-02-05 03:50:31 +0400
commitae27a548f87e938facffc02f015e4a11d45f24cd (patch)
tree969ea5d138fb2b5635e66e6f1c7997602012befc /source
parent55ff9ecdd95ab16b9fc636162e14de8949041e27 (diff)
rigidbody: Fix [#34106] Deleting an object with Bullet Constraint crashes Blender
Constraints are deleted before rigid bodies so need to check if constraint exists in case both the constraint and ridid body are on the same object.
Diffstat (limited to 'source')
-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 7cab0d7471f..bbcb77ef191 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -853,7 +853,7 @@ void BKE_rigidbody_remove_object(Scene *scene, Object *ob)
if (rbw->constraints) {
for (go = rbw->constraints->gobject.first; go; go = go->next) {
Object *obt = go->ob;
- if (obt) {
+ if (obt && obt->rigidbody_constraint) {
rbc = obt->rigidbody_constraint;
if (rbc->ob1 == ob) {
rbc->ob1 = NULL;