Check if NSOrthography is nil before adding it to a set.
This commit is contained in:
1 parent
7861e4fe2c
commit
3e05d0b4f6
1 file changed
+1
-1
@@ -65,7 +65,7 @@
|
||||
|
||||
NSOrthography *ortho = [tagger orthographyAtIndex:0 effectiveRange:NULL];
|
||||
|
||||
if (![ortho.dominantLanguage isEqualToString:@"und"]) {
|
||||
if (ortho && ![ortho.dominantLanguage isEqualToString:@"und"]) {
|
||||
[languagesSet addObject:ortho.dominantLanguage];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user