Skip to content

Commit

Permalink
Merge pull request #81 from LumingYin/master
Browse files Browse the repository at this point in the history
Speculative fix for crashes in libswiftFoundation.dylib
  • Loading branch information
LumingYin authored May 22, 2019
2 parents d121094 + f6333a7 commit 9e6e890
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Shifty/BrowserManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ enum BrowserManager {
logw("Error: Could not get url, app already closed")
return nil
}
guard let window = (browser.windows?() as? [Window])?.first else {
guard let windows = browser.windows?(), windows.count > 0, let window = windows[0] as? Window else {
logw("Error: Could not get url, there are no windows")
return nil
}
Expand Down

0 comments on commit 9e6e890

Please sign in to comment.