Fix free'd memory use removing constraint

This commit is contained in:
Campbell Barton
2015-02-18 10:38:21 +11:00
parent b337cc1c21
commit 1fa98b374f

View File

@@ -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;