Skip to content

Commit

Permalink
Check first if we own the constraint before deleting it.
Browse files Browse the repository at this point in the history
  • Loading branch information
czeidler authored and yourpalal committed May 2, 2012
1 parent 4878cc7 commit 15ef732
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/linprog/LinearSpec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 15ef732

Please sign in to comment.