diff --git a/src/storm/logic/LabelSubstitutionVisitor.cpp b/src/storm/logic/LabelSubstitutionVisitor.cpp index 1e17649a3..08726901c 100644 --- a/src/storm/logic/LabelSubstitutionVisitor.cpp +++ b/src/storm/logic/LabelSubstitutionVisitor.cpp @@ -24,14 +24,14 @@ namespace storm { if (it != labelToExpressionMapping->end()) { return std::static_pointer_cast(std::make_shared(it->second)); } else { - return f.asSharedPointer(); + return std::static_pointer_cast(std::make_shared(f.getLabel())); } } else { auto it = labelToLabelMapping->find(f.getLabel()); if (it != labelToLabelMapping->end()) { return std::static_pointer_cast(std::make_shared(it->second)); } else { - return f.asSharedPointer(); + return std::static_pointer_cast(std::make_shared(f.getLabel())); } } }