diff --git a/src/sbml/SBMLTransforms.cpp b/src/sbml/SBMLTransforms.cpp index b6187c1c4..b47c90719 100644 --- a/src/sbml/SBMLTransforms.cpp +++ b/src/sbml/SBMLTransforms.cpp @@ -553,7 +553,9 @@ SBMLTransforms::clearComponentValues(const Model* m) } // otherwise remove only specific set - mModelValues.erase(m); + if (!mModelValues.empty()) { + mModelValues.erase(m); + } }