mirror of
https://github.com/go-vgo/robotgo
synced 2026-05-24 10:19:01 +00:00
Fix a null pointer
This commit is contained in:
parent
f652aa09a2
commit
aad4a55edb
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue