Check if NSOrthography is nil before adding it to a set.

This commit is contained in:
Damiano Galassi authored and Damiano Galassi committed 2017-06-11 08:38:27 +02:00
1 parent 7861e4fe2c
commit 3e05d0b4f6
1 file changed
+1 -1
+1 -1
View File
@@ -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];
}
}