--- old/src/macosx/native/sun/awt/AWTEvent.m 2012-09-19 14:18:41.000000000 +0400 +++ new/src/macosx/native/sun/awt/AWTEvent.m 2012-09-19 14:18:40.000000000 +0400 @@ -383,6 +383,7 @@ { TISInputSourceRef currentKeyboard = TISCopyCurrentKeyboardInputSource(); CFDataRef uchr = (CFDataRef)TISGetInputSourceProperty(currentKeyboard, kTISPropertyUnicodeKeyLayoutData); + if (uchr == nil) { return; } const UCKeyboardLayout *keyboardLayout = (const UCKeyboardLayout*)CFDataGetBytePtr(uchr); // Carbon modifiers should be used instead of NSEvent modifiers UInt32 modifierKeyState = (GetCurrentEventKeyModifiers() >> 8) & 0xFF;