Check first if we own the constraint before deleting it.
This commit is contained in:
parent
4878cc70e2
commit
15ef732f0d
@ -200,7 +200,8 @@ bool
|
||||
LinearSpec::RemoveConstraint(Constraint* constraint, bool deleteConstraint)
|
||||
{
|
||||
fSolver->ConstraintRemoved(constraint);
|
||||
fConstraints.RemoveItem(constraint);
|
||||
if (!fConstraints.RemoveItem(constraint))
|
||||
return false;
|
||||
constraint->fIsValid = false;
|
||||
|
||||
SummandList* leftSide = constraint->LeftSide();
|
||||
|
Loading…
x
Reference in New Issue
Block a user