mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
Fix a null pointer
This commit is contained in:
parent
f652aa09a2
commit
aad4a55edb
@ -136,8 +136,9 @@ CFStringRef createStringForKey(CGKeyCode keyCode)
|
||||
{
|
||||
TISInputSourceRef currentKeyboard = TISCopyCurrentKeyboardInputSource();
|
||||
CFDataRef layoutData =
|
||||
TISGetInputSourceProperty(currentKeyboard,
|
||||
(CFDataRef)TISGetInputSourceProperty(currentKeyboard,
|
||||
kTISPropertyUnicodeKeyLayoutData);
|
||||
if (layoutData == nil) { return 0; }
|
||||
const UCKeyboardLayout *keyboardLayout =
|
||||
(const UCKeyboardLayout *)CFDataGetBytePtr(layoutData);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user