mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 10:11:46 +00:00
Quickfix #1246
This commit is contained in:
@@ -1866,7 +1866,12 @@ void IfcFile::removeEntity(IfcUtil::IfcBaseClass* entity) {
|
|||||||
|
|
||||||
if (entity->declaration().is(*ifcroot_type_)) {
|
if (entity->declaration().is(*ifcroot_type_)) {
|
||||||
const std::string global_id = *entity->data().getArgument(0);
|
const std::string global_id = *entity->data().getArgument(0);
|
||||||
byguid.erase(byguid.find(global_id));
|
auto it = byguid.find(global_id);
|
||||||
|
if (it != byguid.end()) {
|
||||||
|
byguid.erase(it);
|
||||||
|
} else {
|
||||||
|
Logger::Warning("GlobalId on rooted instance not encountered in map");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
byid.erase(byid.find(id));
|
byid.erase(byid.find(id));
|
||||||
|
|||||||
Reference in New Issue
Block a user