Skip to content

Commit

Permalink
- issue 3249: only request constraint objects if they exist
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergmann committed Jul 8, 2024
1 parent 68c887f commit e88bfb7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions copasi/parameterFitting/CFitProblem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,8 @@ bool CFitProblem::initialize()
for (i = 0, imax = mpExperimentSet->getExperimentCount(); i < imax; i++)
{
mExperimentConstraints(i, j) = pConstraint;
ObjectSet[i].insert(pConstraint->getObject());
if (pConstraint->getObject())
ObjectSet[i].insert(pConstraint->getObject());
}
}
else
Expand All @@ -721,7 +722,8 @@ bool CFitProblem::initialize()
return false;

mExperimentConstraints(Index, j) = pConstraint;
ObjectSet[Index].insert(pConstraint->getObject());
if (pConstraint->getObject())
ObjectSet[Index].insert(pConstraint->getObject());
};
}
}
Expand Down

0 comments on commit e88bfb7

Please sign in to comment.