From e4136c21653a271265f48941baabe59f71568ea7 Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Mon, 29 Jan 2018 11:48:09 -0500 Subject: [PATCH] Sender should be Any? to reflect the fact it may be nil. This nuance seems to make the difference on Xcode 9.3/Swift 4.1 between crashing or not. Without this change, refreshing crashes every time, presumably because Swift is making assumptions about the parameter being non-nil and refreshProgressDidChange calls it explicitly with a nil parameter. --- Evergreen/MainWindow/MainWindowController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Evergreen/MainWindow/MainWindowController.swift b/Evergreen/MainWindow/MainWindowController.swift index cf0898bec..0a0b6b37a 100644 --- a/Evergreen/MainWindow/MainWindowController.swift +++ b/Evergreen/MainWindow/MainWindowController.swift @@ -113,7 +113,7 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations { // MARK: Toolbar - @objc func makeToolbarValidate(_ sender: Any) { + @objc func makeToolbarValidate(_ sender: Any?) { window?.toolbar?.validateVisibleItems() }