diff --git a/src/storm/storage/jani/VariableSet.cpp b/src/storm/storage/jani/VariableSet.cpp index a2fd5a660..0c2b21455 100644 --- a/src/storm/storage/jani/VariableSet.cpp +++ b/src/storm/storage/jani/VariableSet.cpp @@ -214,7 +214,7 @@ namespace storm { std::shared_ptr janiVar = std::move(vToVIt->second); variableToVariable.erase(vToVIt); - nameToVariable.erase(variable.getName()); + nameToVariable.erase(janiVar->getName()); eraseFromVariableVector(variables, variable); if (janiVar->isBooleanVariable()) { eraseFromVariableVector(booleanVariables, variable);