Fixed crash on Mac m1 on removing unused types (similar to 4d0be1972)

This commit is contained in:
Andrej730
2023-06-29 15:34:52 +05:00
parent 7a4baed6e6
commit ac45b16e73
+1 -1
View File
@@ -34,8 +34,8 @@ def assign_type(ifc, type_tool, element=None, type=None):
def purge_unused_types(ifc, type):
for element_type in type.get_model_types():
if not type.get_type_occurrences(element_type):
ifc.run("root.remove_product", product=element_type)
obj = ifc.get_object(element_type)
ifc.run("root.remove_product", product=element_type)
if obj:
ifc.unlink(obj=obj)
type.remove_object(obj)