diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index 66ee47e5e4..8d1b036573 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -2211,7 +2211,9 @@ IfcEntityList::ptr IfcFile::getInverse(int instance_id, const IfcParse::declarat if (valid && attribute_index >= 0) { try { 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; } else if (arg->type() == IfcUtil::Argument_AGGREGATE_OF_ENTITY_INSTANCE) { IfcEntityList::ptr li = *arg;