Skip to content

Commit b0ccf69

Browse files
committed
Don't add inverse references to the entity being added itself.
1 parent 573655e commit b0ccf69

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/ifcparse/IfcParse.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,7 @@ IfcUtil::IfcBaseClass* IfcFile::addEntity(IfcUtil::IfcBaseClass* entity) {
11171117
} catch (...) {}
11181118
for (IfcEntityList::it it = entity_attributes->begin(); it != entity_attributes->end(); ++it) {
11191119
IfcUtil::IfcBaseClass* entity_attribute = *it;
1120+
if (*it == entity) continue;
11201121
try {
11211122
if (!IfcSchema::Type::IsSimple(entity_attribute->type())) {
11221123
unsigned entity_attribute_id = entity_attribute->entity->id();

0 commit comments

Comments
 (0)