From 0d6a5f4a8db1b35783d11fcaa1b40701e44b261f Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 19 Aug 2022 22:22:14 +0800 Subject: [PATCH] ctlIME // Add guard-let to client() in clientBundleIdentifier(). --- .../Modules/ControllerModules/ctlInputMethod_Delegates.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Modules/ControllerModules/ctlInputMethod_Delegates.swift b/Source/Modules/ControllerModules/ctlInputMethod_Delegates.swift index d265234f..608e6958 100644 --- a/Source/Modules/ControllerModules/ctlInputMethod_Delegates.swift +++ b/Source/Modules/ControllerModules/ctlInputMethod_Delegates.swift @@ -13,7 +13,10 @@ import Cocoa // MARK: - KeyHandler Delegate extension ctlInputMethod: KeyHandlerDelegate { - var clientBundleIdentifier: String { client()?.bundleIdentifier() ?? "" } + var clientBundleIdentifier: String { + guard let client = client() else { return "" } + return client.bundleIdentifier() ?? "" + } func ctlCandidate() -> ctlCandidateProtocol { ctlInputMethod.ctlCandidateCurrent }