forked from bartvdbraak/blender
Bugfix #20975: Deleting a constraint causes segfault
Missing null checks in API functions.
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user