From 048ee84ae6760e85b2039785cec199137fb6a558 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 27 Mar 2020 14:06:43 +0100 Subject: [PATCH] Propagate failure on representation to product --- src/ifcgeom/schema/mapping.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/schema/mapping.cpp b/src/ifcgeom/schema/mapping.cpp index d59273fd91..549baeaf82 100644 --- a/src/ifcgeom/schema/mapping.cpp +++ b/src/ifcgeom/schema/mapping.cpp @@ -348,7 +348,13 @@ taxonomy::item* mapping::map_impl(const IfcSchema::IfcProduct* inst) { n->instance = inst; c->children = { n }; } else { - c->children = { map(body) }; + auto child = map(body); + if (child) { + c->children = { child }; + } else { + delete c; + return nullptr; + } } return c; }