diff --git a/src/ifcgeom/Iterator.h b/src/ifcgeom/Iterator.h index 129be4b7f9..9bcb2826bc 100644 --- a/src/ifcgeom/Iterator.h +++ b/src/ifcgeom/Iterator.h @@ -584,7 +584,9 @@ namespace IfcGeom { // Increment the iterator over the list of products using the current // shape representation if (task_result_iterator_ == --all_processed_elements_.end()) { - return create(); + if (!create()) { + return nullptr; + } } task_result_iterator_++;