mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
09313eac40
tool.Geometry.delete_data() only guarded against TypeError (passing the wrong bpy.data collection). If the data-block had already been freed elsewhere between the earlier has_data_users() check and this deferred cleanup call (observed after a busy sequence of switch_representation calls followed by remove_representation), bpy.data.meshes.remove() raises an uncaught ReferenceError, which aborts the whole IFC operator transaction with a traceback matching the one reported in #5793. Catch ReferenceError too and treat an already-removed data-block as a no-op, since the desired end state (the data being gone) is already met. Generated with the assistance of an AI coding tool.