From 1edeb6385c4fd841480f2d07a07ed02d9d823096 Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Sun, 28 Nov 2021 14:23:27 +0100 Subject: [PATCH] fix: fixed app hang on CPU and RAM popup, 10.13 only (#721, #640) --- Stats/AppDelegate.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Stats/AppDelegate.swift b/Stats/AppDelegate.swift index f94f4d8e..f2e7933a 100755 --- a/Stats/AppDelegate.swift +++ b/Stats/AppDelegate.swift @@ -41,9 +41,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele private let updateActivity = NSBackgroundActivityScheduler(identifier: "eu.exelban.Stats.updateCheck") static func main() { + let app = NSApplication.shared let delegate = AppDelegate() - NSApplication.shared.delegate = delegate - NSApplication.shared.run() + app.delegate = delegate + app.run() } func applicationDidFinishLaunching(_ aNotification: Notification) {