From e0ae29d64a6abbc6bd929abe5f19d950fb56def5 Mon Sep 17 00:00:00 2001 From: lwouis Date: Sun, 30 Nov 2025 19:44:17 +0100 Subject: [PATCH] fix: sending feedback with a debug-profile could sometimes crash --- src/logic/DebugProfile.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/logic/DebugProfile.swift b/src/logic/DebugProfile.swift index 1df2f706..4d239694 100644 --- a/src/logic/DebugProfile.swift +++ b/src/logic/DebugProfile.swift @@ -107,9 +107,9 @@ class DebugProfile { static func inputSource() -> String { if let inputSource = TISCopyCurrentKeyboardInputSource()?.takeUnretainedValue(), - let cfName = TISGetInputSourceProperty(inputSource, kTISPropertyLocalizedName) { - let name = Unmanaged.fromOpaque(cfName).takeUnretainedValue() as String - return name + let localizedNamePointer = TISGetInputSourceProperty(inputSource, kTISPropertyLocalizedName) { + let localizedName = Unmanaged.fromOpaque(localizedNamePointer).takeUnretainedValue() + return localizedName as? String ?? "" } return "" }