From 225446ac996426a7b3dceb7f24b9084cff8c5f00 Mon Sep 17 00:00:00 2001 From: czeidler Date: Sat, 1 Sep 2012 16:30:19 +1200 Subject: [PATCH] Check if constraint is NULL. --- src/libs/linprog/LinearSpec.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libs/linprog/LinearSpec.cpp b/src/libs/linprog/LinearSpec.cpp index cb7137ed65..ac50ef6474 100644 --- a/src/libs/linprog/LinearSpec.cpp +++ b/src/libs/linprog/LinearSpec.cpp @@ -288,6 +288,8 @@ bool LinearSpec::RemoveConstraint(Constraint* constraint, bool deleteConstraint, bool notifyListener) { + if (constraint == NULL) + return false; fSolver->ConstraintRemoved(constraint); if (!fConstraints.RemoveItem(constraint)) return false;