Skip to content

Commit

Permalink
Avoid calling FlatMenu Destroy() in a finally block
Browse files Browse the repository at this point in the history
Fixes: #2630
  • Loading branch information
swt2c committed Nov 8, 2024
1 parent 45871c2 commit 8620868
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions wx/lib/agw/flatmenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -5358,10 +5358,8 @@ def __init__(self, parent=None):


def Destroy(self, *args, **kwargs):
try:
self.Clear()
finally:
return super().Destroy(*args, **kwargs)
self.Clear()
return super().Destroy(*args, **kwargs)


def SetMenuBar(self, mb):
Expand Down

0 comments on commit 8620868

Please sign in to comment.