From 16cafb9f8b385427dd66f462593a8810306b0e48 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 11 Jan 2019 16:22:53 +0100 Subject: [PATCH] Fix #534 --- src/ifcgeom/IfcGeomFunctions.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index af4e039536..46fcc459e6 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -1530,8 +1530,8 @@ IfcGeom::BRepElement* IfcGeom::Kernel::create_brep_for_representation_and int parent_id = -1; try { - IfcSchema::IfcObjectDefinition* parent_object = get_decomposing_entity(product)->as(); - if (parent_object) { + IfcUtil::IfcBaseEntity* parent_object = get_decomposing_entity(product); + if (parent_object && parent_object->as()) { parent_id = parent_object->data().id(); } } catch (const std::exception& e) { @@ -1777,8 +1777,8 @@ IfcGeom::BRepElement* IfcGeom::Kernel::create_brep_for_processed_represen { int parent_id = -1; try { - IfcSchema::IfcObjectDefinition* parent_object = get_decomposing_entity(product)->as(); - if (parent_object) { + IfcUtil::IfcBaseEntity* parent_object = get_decomposing_entity(product); + if (parent_object && parent_object->as()) { parent_id = parent_object->data().id(); } } catch (const std::exception& e) {