From eb1c81514b427511b8ed9c8590407a481b4a4d17 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 28 Oct 2025 10:51:31 +0100 Subject: [PATCH] Check for attribute nil #7276 #7291 --- src/ifcgeom/mapping/mapping.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcgeom/mapping/mapping.cpp b/src/ifcgeom/mapping/mapping.cpp index 004a41821c..8c130aa5f6 100644 --- a/src/ifcgeom/mapping/mapping.cpp +++ b/src/ifcgeom/mapping/mapping.cpp @@ -374,7 +374,7 @@ const IfcUtil::IfcBaseEntity* mapping::get_single_material_association(const Ifc #endif #ifdef SCHEMA_HAS_IfcMaterialConstituentSet - if (associated_material->as()) { + if (associated_material->as() && associated_material->as()->MaterialConstituents()) { IfcSchema::IfcMaterialConstituentSet* constituentset = associated_material->as(); if (settings_.get().value ? constituentset->MaterialConstituents()->get()->size() >= 1 : constituentset->MaterialConstituents()->get()->size() == 1) { IfcSchema::IfcMaterialConstituent* constituent = (*constituentset->MaterialConstituents()->get()->begin());