diff --git a/CHANGELOG.md b/CHANGELOG.md index d5ac035..2066306 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ HotApps Changelog ============================ +#### 0.5.1 +- fixed HotApps crashing when entering screen saver + + #### 0.5 - improved corner detection - fixed a bug where a HotApp would hide/unhide even though the pointer was not at corner anymore diff --git a/HotApps/AppDelegate.swift b/HotApps/AppDelegate.swift index 919c040..244f9a3 100644 --- a/HotApps/AppDelegate.swift +++ b/HotApps/AppDelegate.swift @@ -178,6 +178,13 @@ class AppDelegate: NSObject, NSApplicationDelegate { let cornerType = pointerCheck() let workspace = NSWorkspace.shared + + // If the user is not logged in, there is no frontmost app + // This happens if the user is in screen saver or login screen + if workspace.frontmostApplication == nil { + return + } + let frontApp = workspace.frontmostApplication! let frontAppName = self.cleanBundleURLString(bundleURLString: frontApp.bundleURL!.absoluteString)