Bugzilla – Attachment 639 Details for
Bug 1065
NEWT crash at WindowDriver.initIds0(): TISGetInputSourceProperty(keyboard, kTISPropertyUnicodeKeyLayoutData) returns NULL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
NEWT patch .. 01
newt-01.diff (text/plain), 1.25 KB, created by
Sven Gothel
on 2014-09-08 08:07:43 CEST
(
hide
)
Description:
NEWT patch .. 01
Filename:
MIME Type:
Creator:
Sven Gothel
Created:
2014-09-08 08:07:43 CEST
Size:
1.25 KB
patch
obsolete
>diff --git a/src/newt/native/NewtMacWindow.m b/src/newt/native/NewtMacWindow.m >index 5a19631..caf9e54 100644 >--- a/src/newt/native/NewtMacWindow.m >+++ b/src/newt/native/NewtMacWindow.m >@@ -124,6 +124,9 @@ static CFStringRef CKCH_CreateStringForKey(CGKeyCode keyCode, const UCKeyboardLa > > static CFMutableDictionaryRef CKCH_CreateCodeToCharDict(TISInputSourceRef keyboard) { > CFDataRef layoutData = (CFDataRef) TISGetInputSourceProperty(keyboard, kTISPropertyUnicodeKeyLayoutData); >+ if( NULL == layoutData ) { >+ return NULL; >+ } > const UCKeyboardLayout *keyboardLayout = (const UCKeyboardLayout *)CFDataGetBytePtr(layoutData); > > CFMutableDictionaryRef codeToCharDict = CFDictionaryCreateMutable(kCFAllocatorDefault, 128, NULL, NULL); >@@ -149,8 +152,10 @@ static CFMutableDictionaryRef CKCH_USCodeToNNChar = NULL; > > static void CKCH_CreateDictionaries() { > TISInputSourceRef currentKeyboard = TISCopyCurrentKeyboardInputSource(); >- CKCH_USCodeToNNChar = CKCH_CreateCodeToCharDict(currentKeyboard); >- CFRelease(currentKeyboard); >+ if( NULL != currentKeyboard ) { >+ CKCH_USCodeToNNChar = CKCH_CreateCodeToCharDict(currentKeyboard); >+ CFRelease(currentKeyboard); >+ } > } > > static UniChar CKCH_CharForKeyCode(jshort keyCode) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1065
:
634
|
635
|
636
|
637
|
638
| 639