Fix #2835. Bug where in certain scenarios the decorator would crash due to prematurely freed bmesh.

This commit is contained in:
Dion Moult
2023-03-06 15:06:12 +11:00
parent a8f1df8a50
commit 9e0c5e9244
2 changed files with 0 additions and 2 deletions
@@ -56,7 +56,6 @@ def mode_callback(obj, data):
bm = bmesh.from_edit_mesh(obj.data)
bmesh.ops.dissolve_limit(bm, angle_limit=pi / 180 * 1, verts=bm.verts, edges=bm.edges)
bmesh.update_edit_mesh(obj.data)
bm.free()
else:
material_usage = ifcopenshell.util.element.get_material(product)
x, y = obj.dimensions[0:2]
@@ -58,7 +58,6 @@ def mode_callback(obj, data):
bm = bmesh.from_edit_mesh(obj.data)
bmesh.ops.dissolve_limit(bm, angle_limit=pi / 180 * 1, verts=bm.verts, edges=bm.edges)
bmesh.update_edit_mesh(obj.data)
bm.free()
else:
new_origin = obj.matrix_world @ Vector(obj.bound_box[0])
obj.data.transform(