Fix segfault thanks to aothms.

This commit is contained in:
Dion Moult
2021-12-02 12:32:17 +11:00
committed by Thomas Krijnen
parent 01bc29c5b2
commit ebe5460a9f
+5 -1
View File
@@ -2110,7 +2110,11 @@ void IfcFile::process_deletion_() {
}
}
{
byref_excl.erase(name);
auto byref_it = byref_excl.find(name);
if (byref_it != byref_excl.end()) {
auto& ids = byref_it->second;
ids.erase(std::remove(ids.begin(), ids.end(), id), ids.end());
}
}
}
}