Remove the clear progress timer on window destruction

Prevents callback to destroyed window object
This commit is contained in:
Kovid Goyal 2026-07-09 11:41:58 +05:30
parent d90248f03c
commit d83c506a57
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -1930,6 +1930,9 @@ class Window:
def destroy(self) -> None:
self.call_watchers(self.watchers.on_close, {})
self.destroyed = True
if self.clear_progress_timer:
remove_timer(self.clear_progress_timer)
self.clear_progress_timer = 0
self.clipboard_request_manager.close()
del self.kitten_result_processors
if hasattr(self, 'screen'):