Skip to content

Commit

Permalink
Fixed Bug 2178: During compile of COptItem a missing number was acces…
Browse files Browse the repository at this point in the history
…sed for comparison.
  • Loading branch information
Stefan Hoops committed Jul 15, 2015
1 parent 7c5d18d commit 49d1f56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion copasi/optimization/COptItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ bool COptItem::compile(const std::vector< CCopasiContainer * > listOfContainer)
success = false;
}

if (!mpUpperObject && !mpLowerObject && *mpUpperBound < *mpLowerBound)
// We can only access the lower and upper numbers if the compile succeeded so far.
if (success && !mpUpperObject && !mpLowerObject && *mpUpperBound < *mpLowerBound)
{
CCopasiMessage(CCopasiMessage::ERROR, MCOptimization + 4, *mpLowerBound, *mpUpperBound, mpObject->getObjectDisplayName().c_str());
success = false;
Expand Down

0 comments on commit 49d1f56

Please sign in to comment.