Bugfix #20975: Deleting a constraint causes segfault

Missing null checks in API functions.
This commit is contained in:
Joshua Leung 2010-02-05 06:05:24 +00:00
parent f7a24a25ba
commit ba6d50c3d3

@ -3878,11 +3878,13 @@ void constraints_set_active (ListBase *list, bConstraint *con)
{
bConstraint *c;
for (c= list->first; c; c= c->next) {
if (c == con)
c->flag |= CONSTRAINT_ACTIVE;
else
c->flag &= ~CONSTRAINT_ACTIVE;
if (list) {
for (c= list->first; c; c= c->next) {
if (c == con)
c->flag |= CONSTRAINT_ACTIVE;
else
c->flag &= ~CONSTRAINT_ACTIVE;
}
}
}