From 05a7aac62e3e0bcf3c206607863d200f52f6588b Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 28 Mar 2023 15:20:54 +0200 Subject: [PATCH] Prevent double counting elements in single threaded mode --- src/ifcgeom/Iterator.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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_++;