mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 14:31:39 +00:00
#1676 null handling in inverses
This commit is contained in:
@@ -2211,7 +2211,9 @@ IfcEntityList::ptr IfcFile::getInverse(int instance_id, const IfcParse::declarat
|
|||||||
if (valid && attribute_index >= 0) {
|
if (valid && attribute_index >= 0) {
|
||||||
try {
|
try {
|
||||||
Argument* arg = (*it)->data().getArgument(attribute_index);
|
Argument* arg = (*it)->data().getArgument(attribute_index);
|
||||||
if (arg->type() == IfcUtil::Argument_ENTITY_INSTANCE) {
|
if (arg->isNull()) {
|
||||||
|
valid = false;
|
||||||
|
} else if (arg->type() == IfcUtil::Argument_ENTITY_INSTANCE) {
|
||||||
valid = instance == *arg;
|
valid = instance == *arg;
|
||||||
} else if (arg->type() == IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE) {
|
} else if (arg->type() == IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE) {
|
||||||
IfcEntityList::ptr li = *arg;
|
IfcEntityList::ptr li = *arg;
|
||||||
|
|||||||
Reference in New Issue
Block a user