diff --git a/src/bonsai/bonsai/tool/geometry.py b/src/bonsai/bonsai/tool/geometry.py index 446b51dd7b..4947666bd6 100644 --- a/src/bonsai/bonsai/tool/geometry.py +++ b/src/bonsai/bonsai/tool/geometry.py @@ -269,8 +269,9 @@ class Geometry(bonsai.core.tool.Geometry): ifcopenshell.api.run("root.remove_product", tool.Ifc.get(), product=element) data = obj.data - if tool.Geometry.has_mesh_properties(data) and tool.Ifc.get_entity_by_id( - tool.Geometry.get_mesh_props(data).ifc_definition_id + if ( + tool.Geometry.has_mesh_properties(data) + and tool.Ifc.get_entity_by_id(tool.Geometry.get_mesh_props(data).ifc_definition_id) is None ): tool.Blender.remove_data_block(data)