Skip to content
Snippets Groups Projects
Commit f1b7bcb3 authored by Olivier BICHLER's avatar Olivier BICHLER Committed by Axel Farrugia
Browse files

Fixed map::at() bug in DynamicAttribute::dict()

parent 9a95887b
No related branches found
No related tags found
2 merge requests!279v0.4.0,!250[Feat](Exports) Add custom options to exports
......@@ -166,7 +166,14 @@ public:
attributes[elt.first.c_str()] = future_std::any_cast<const DynamicAttributes&>(elt.second).dict();
}
else {
attributes[elt.first.c_str()] = mAnyUtils.at(elt.second.type())->cast(elt.second);
// At this point, not every attribute may be known to mAnyUtils
const auto anyUtilsIt = mAnyUtils.find(elt.second.type());
if (anyUtilsIt != mAnyUtils.end()) {
attributes[elt.first.c_str()] = anyUtilsIt->second->cast(elt.second);
}
else {
attributes[elt.first.c_str()] = "???";
}
}
}
return attributes;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment