Fix a crash on exit on macOS

Calling Python API functions is not allowed in atexit handlers.

Fixes #3686
This commit is contained in:
Kovid Goyal
2021-06-03 11:54:55 +05:30
parent 2e7b68bf74
commit 93e9d3cb5f
4 changed files with 14 additions and 4 deletions

View File

@@ -178,6 +178,9 @@ class AppRunner:
finally:
set_options(None)
free_font_data() # must free font data before glfw/freetype/fontconfig/opengl etc are finalized
if is_macos:
from kitty.fast_data_types import set_notification_activated_callback
set_notification_activated_callback(None)
run_app = AppRunner()