ignore duplicate quit events when the window is closed twice

quit_event ran its cleanup path again when a second delete-event
arrived after the state had already switched to Quit_State, hanging
the application on shutdown. Return early instead.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
markusro committed 2026-10-19 23:16:14 +02:00
1 parent 34eb7b2728
commit d539a27423
1 file changed
+3
+3
View File
@@ -333,6 +333,9 @@ class DamarisGUI:
"""
expecting quit event for main application
"""
if self.state == DamarisGUI.Quit_State:
# quit already handled, e.g. window closed twice
return True
if self.state in [ DamarisGUI.Edit_State, DamarisGUI.Quit_State ]:
self.state = DamarisGUI.Quit_State
# do a cleanup...