MacOS: Fix crash on exit

* Fixes #9423
This commit is contained in:
Jonathan White 2023-07-09 15:04:14 -04:00
parent 13a71ff1c8
commit 1594e5f4e3
No known key found for this signature in database
GPG Key ID: 440FC65F2E0C6E01

View File

@ -243,6 +243,7 @@ AppKit::~AppKit()
{
[[[NSWorkspace sharedWorkspace] notificationCenter] removeObserver:static_cast<id>(self)];
[[NSDistributedNotificationCenter defaultCenter] removeObserver:static_cast<id>(self)];
[NSApp removeObserver:static_cast<id>(self) forKeyPath:@"effectiveAppearance"];
[static_cast<id>(self) dealloc];
}