Fix compiler warning when downcasting ViewController
This commit is contained in:
parent
2a9b831312
commit
0e2e48802a
@ -45,7 +45,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
|
||||
func applicationDidBecomeActive(_ notification: Notification) {
|
||||
if vc == nil {
|
||||
vc = NSApplication.shared().mainWindow?.contentViewController as! ViewController
|
||||
vc = NSApplication.shared().mainWindow?.contentViewController as? ViewController
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user