Applied patch from tailblues. It checks for a NULL result from
CFStringCreate...() to avoid a crash in a subsequent use of that NULL pointer.
This commit is contained in:
parent
617b93b984
commit
899beb6919
|
@ -793,6 +793,13 @@ COSXKeyState::CKeyResource::getKeyID(UInt8 c)
|
||||||
str, GetScriptManagerVariable(smKeyScript),
|
str, GetScriptManagerVariable(smKeyScript),
|
||||||
kCFAllocatorNull);
|
kCFAllocatorNull);
|
||||||
|
|
||||||
|
// sometimes CFStringCreate...() returns NULL (e.g. Apple Korean
|
||||||
|
// encoding with char value 214). if it did then make no key,
|
||||||
|
// otherwise CFStringCreateMutableCopy() will crash.
|
||||||
|
if (cfString == NULL) {
|
||||||
|
return kKeyNone;
|
||||||
|
}
|
||||||
|
|
||||||
// convert to precomposed
|
// convert to precomposed
|
||||||
CFMutableStringRef mcfString =
|
CFMutableStringRef mcfString =
|
||||||
CFStringCreateMutableCopy(kCFAllocatorDefault, 0, cfString);
|
CFStringCreateMutableCopy(kCFAllocatorDefault, 0, cfString);
|
||||||
|
|
Loading…
Reference in New Issue