Skip to content

Commit

Permalink
fix: app crashes when no windows are open
Browse files Browse the repository at this point in the history
  • Loading branch information
rbnis authored and lwouis committed Jan 5, 2020
1 parent 4317bed commit cecc53a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions alt-tab-macos/logic/TrackedWindows.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ class TrackedWindows {
}

private class func isSingleSpace() {
let firstSpaceIndex = list[0].spaceIndex
for window in list {
if window.spaceIndex != nil && window.spaceIndex != firstSpaceIndex {
Spaces.singleSpace = false
return
if list.count > 0 {
let firstSpaceIndex = list[0].spaceIndex
for window in list {
if window.spaceIndex != nil && window.spaceIndex != firstSpaceIndex {
Spaces.singleSpace = false
return
}
}
}
Spaces.singleSpace = true
Expand Down

0 comments on commit cecc53a

Please sign in to comment.