From 96c8323a06983e12daf00031c4c2afa3e835c63a Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sat, 20 Jan 2024 14:16:54 +1100 Subject: [PATCH] Fix #4221. Only load leaf rows with cost values. Createing a monetary measure with None results in a segfault on Windows. --- src/ifc5d/ifc5d/csv2ifc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifc5d/ifc5d/csv2ifc.py b/src/ifc5d/ifc5d/csv2ifc.py index b97ba7c68d..cb7b8869ff 100644 --- a/src/ifc5d/ifc5d/csv2ifc.py +++ b/src/ifc5d/ifc5d/csv2ifc.py @@ -134,7 +134,7 @@ class Csv2Ifc: category = category.replace("Rate", "") category = category.strip() cost_value.Category = category - else: + elif cost_item["CostValues"]: cost_value = ifcopenshell.api.run("cost.add_cost_value", self.file, parent=cost_item["ifc"]) cost_value.AppliedValue = self.file.createIfcMonetaryMeasure(cost_item["CostValues"]) if self.is_schedule_of_rates: