From 0e2e48802a185543af60ebead7c1a3d58a61c3f7 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 31 Jul 2017 19:21:06 -0400 Subject: [PATCH] Fix compiler warning when downcasting ViewController --- writeas/AppDelegate.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/writeas/AppDelegate.swift b/writeas/AppDelegate.swift index 47ccc94..f8427aa 100644 --- a/writeas/AppDelegate.swift +++ b/writeas/AppDelegate.swift @@ -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 } }