From 8f15a851641d0e30e7459ffd4dea94a37f92e5b9 Mon Sep 17 00:00:00 2001 From: Svend Date: Sun, 30 Jun 2019 20:16:07 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E9=A6=96=E6=AC=A1?= =?UTF-8?q?=E6=89=93=E5=BC=80=E5=81=8F=E5=A5=BD=E8=AE=BE=E7=BD=AE=E4=BC=9A?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E4=BC=9A=E5=B4=A9=E6=BA=83=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uPic/PreferencesWindow/HostPreferencesViewController.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uPic/PreferencesWindow/HostPreferencesViewController.swift b/uPic/PreferencesWindow/HostPreferencesViewController.swift index cb6b395..4ef27cf 100644 --- a/uPic/PreferencesWindow/HostPreferencesViewController.swift +++ b/uPic/PreferencesWindow/HostPreferencesViewController.swift @@ -109,7 +109,9 @@ class HostPreferencesViewController: PreferencesViewController { @IBAction func saveButtonClicked(_ sender: Any?) { // 取消一下节流函数的定时器,确保不会在点击保存按钮后,再重新计划安装状态 - self.hostConfigChangedDebouncedFunc(true) + if self.hostConfigChangedDebouncedFunc != nil { + self.hostConfigChangedDebouncedFunc(true) + } // 先让当前正在编辑的输入框触发一下 editEnd 事件,来 trim 一下本身 self.blurEditingTextField()