From 2081dc4c0856a839acc1dd49d4636b822158a760 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sat, 23 Apr 2022 10:51:16 +0200 Subject: [PATCH] #2156 Don't try to convert unset placements in element hierarchy parsing --- src/ifcgeom/IfcGeomIteratorImplementation.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ifcgeom/IfcGeomIteratorImplementation.h b/src/ifcgeom/IfcGeomIteratorImplementation.h index 24074078ef..d809383325 100644 --- a/src/ifcgeom/IfcGeomIteratorImplementation.h +++ b/src/ifcgeom/IfcGeomIteratorImplementation.h @@ -1045,12 +1045,14 @@ namespace IfcGeom { Logger::Error("Failed to find decomposing entity"); } - try { - kernel.convert(ifc_product->ObjectPlacement(), trsf); - } catch (const std::exception& e) { - Logger::Error(e); - } catch (...) { - Logger::Error("Failed to construct placement"); + if (ifc_product->ObjectPlacement()) { + try { + kernel.convert(ifc_product->ObjectPlacement(), trsf); + } catch (const std::exception& e) { + Logger::Error(e); + } catch (...) { + Logger::Error("Failed to construct placement"); + } } } } catch (const std::exception& e) {