Toponaming: defend against uninitialized elementMap in getElementHistory

This commit is contained in:
bgbsww
2024-06-03 18:40:45 -04:00
committed by Chris Hennes
parent fc714933a7
commit 20bcd7c8f4

View File

@@ -296,7 +296,10 @@ public:
// NOTE: getElementHistory is now in ElementMap
long getElementHistory(const MappedName & name,
MappedName *original=nullptr, std::vector<MappedName> *history=nullptr) const {
return _elementMap->getElementHistory(name, Tag, original, history);
if ( _elementMap != nullptr ) {
return _elementMap->getElementHistory(name, Tag, original, history);
}
return 0;
};
void setMappedChildElements(const std::vector<Data::ElementMap::MappedChildElements> & children);