fix: sending feedback with a debug-profile could sometimes crash
This commit is contained in:
1 parent
db78e66451
commit
e0ae29d64a
1 file changed
+3
-3
@@ -107,9 +107,9 @@ class DebugProfile {
|
||||
|
||||
static func inputSource() -> String {
|
||||
if let inputSource = TISCopyCurrentKeyboardInputSource()?.takeUnretainedValue(),
|
||||
let cfName = TISGetInputSourceProperty(inputSource, kTISPropertyLocalizedName) {
|
||||
let name = Unmanaged<CFString>.fromOpaque(cfName).takeUnretainedValue() as String
|
||||
return name
|
||||
let localizedNamePointer = TISGetInputSourceProperty(inputSource, kTISPropertyLocalizedName) {
|
||||
let localizedName = Unmanaged<AnyObject>.fromOpaque(localizedNamePointer).takeUnretainedValue()
|
||||
return localizedName as? String ?? ""
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user