From e86624873bc4b289773a31eaeeae723f7e09908e Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Wed, 5 Feb 2025 14:10:04 +1100 Subject: [PATCH] Fix segfault from editing a IFC2X3 georeferencing pset with a null map unit. Doing createIfcIdentifier(None) segfaults. --- .../ifcopenshell/api/georeference/edit_georeferencing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_georeferencing.py b/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_georeferencing.py index bce415d55b..a733c639cf 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_georeferencing.py +++ b/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_georeferencing.py @@ -90,7 +90,7 @@ def edit_georeferencing( v = file.createIfcText(v) elif k == "Name": v = file.createIfcLabel(v) - else: + elif v is not None: v = file.createIfcIdentifier(v) ifcopenshell.api.pset.edit_pset(file, crs, properties=projected_crs) if coordinate_operation: