Skip to content

Commit

Permalink
fix crashing when entering screen saver
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyrilHD committed Feb 20, 2023
1 parent 48d02d0 commit 3c9c1d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 7 additions & 0 deletions HotApps/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 3c9c1d1

Please sign in to comment.