From 79860a0c0405aede30e57f9400163d103556a32c Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 25 Apr 2023 21:00:01 +0200 Subject: [PATCH] Fix iterator::get() invalid cast on nullptr --- src/ifcgeom/IfcGeomIteratorImplementation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcGeomIteratorImplementation.h b/src/ifcgeom/IfcGeomIteratorImplementation.h index 4f7ab5ecba..ea1d93bafe 100644 --- a/src/ifcgeom/IfcGeomIteratorImplementation.h +++ b/src/ifcgeom/IfcGeomIteratorImplementation.h @@ -1038,7 +1038,7 @@ namespace IfcGeom { ifc_product = ifc_entity->as(); parent_id = -1; try { - IfcSchema::IfcObjectDefinition* parent_object = kernel.get_decomposing_entity(ifc_product)->template as(); + auto parent_object = kernel.get_decomposing_entity(ifc_product); if (parent_object) { parent_id = parent_object->data().id(); }