diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-02-18 02:38:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-02-18 02:44:17 +0300 |
commit | 1fa98b374f620b3357fb26bf959c38cff9f8cc7e (patch) | |
tree | d5fb5dc228994f3f9298bc05185fe5b72b408d7c /source/blender/blenkernel/intern/constraint.c | |
parent | b337cc1c21cf9e77f25dd47baea1d2fa4b7d368d (diff) |
Fix free'd memory use removing constraint
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 71b2e7df4b2..93f524a5439 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -4419,9 +4419,10 @@ bool BKE_constraint_remove(ListBase *list, bConstraint *con) bool BKE_constraint_remove_ex(ListBase *list, Object *ob, bConstraint *con, bool clear_dep) { + const short type = con->type; if (BKE_constraint_remove(list, con)) { /* ITASC needs to be rebuilt once a constraint is removed [#26920] */ - if (clear_dep && ELEM(con->type, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK)) { + if (clear_dep && ELEM(type, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK)) { BIK_clear_data(ob->pose); } return true; |