aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--cocoa/ScintillaCocoa.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm
index b8c948dda..910cd344a 100644
--- a/cocoa/ScintillaCocoa.mm
+++ b/cocoa/ScintillaCocoa.mm
@@ -606,6 +606,8 @@ CaseFolder *ScintillaCocoa::CaseFolderForEncoding() {
CFStringRef cfsVal = CFStringCreateWithBytes(kCFAllocatorDefault,
reinterpret_cast<const UInt8 *>(sCharacter),
1, encoding, false);
+ if (!cfsVal)
+ continue;
NSString *sMapped = [(NSString *)cfsVal stringByFoldingWithOptions:NSCaseInsensitiveSearch
locale:[NSLocale currentLocale]];