Don't set the language to nil if the linguistic tagger is not able to find a language.

This commit is contained in:
Damiano Galassi committed 2014-12-11 16:28:01 +01:00
1 parent fd8c5cf274
commit 3bf6d614b6
1 file changed
+4 -2
+4 -2
View File
@@ -73,8 +73,10 @@
NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en"];
NSString *languageName = [locale displayNameForKey:NSLocaleLanguageCode
value:language];
newTrack.language = languageName;
if (languageName) {
newTrack.language = languageName;
}
[locale release];
}
}