Skip to content

Commit

Permalink
fix: fix the error that occurs when cancelling a panel operation on t…
Browse files Browse the repository at this point in the history
…he first step (selecting geometry)
  • Loading branch information
tristan-hm committed Jul 23, 2024
1 parent cc55564 commit 0fe30a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sketch/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ def do_invoke(self, context, event):
self.target_obj = context.active_object

create_duplicate_liftable_geometry(context, {'FACE'}, 'ND — Panel', not event.shift)

self.panel_obj = context.active_object
self.panel_bm = None

self.inset_input_stream = new_stream()

Expand Down Expand Up @@ -239,7 +241,8 @@ def finish(self, context):


def revert(self, context):
self.panel_bm.free()
if self.panel_bm is not None:
self.panel_bm.free()

bpy.ops.object.mode_set(mode='OBJECT')
bpy.data.objects.remove(self.panel_obj, do_unlink=True)
Expand Down

0 comments on commit 0fe30a7

Please sign in to comment.