Skip to content
Snippets Groups Projects
Commit 9a0cfbf2 authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

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

parent aa939b56
No related branches found
No related tags found
No related merge requests found
...@@ -166,7 +166,14 @@ public: ...@@ -166,7 +166,14 @@ public:
attributes[elt.first.c_str()] = future_std::any_cast<const DynamicAttributes&>(elt.second).dict(); attributes[elt.first.c_str()] = future_std::any_cast<const DynamicAttributes&>(elt.second).dict();
} }
else { 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; 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