From 3e05d0b4f6a770cbce180e98d99e8a0f4f6e8c51 Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Sun, 11 Jun 2017 08:38:27 +0200 Subject: [PATCH] Check if NSOrthography is nil before adding it to a set. --- MP42/MP42SrtImporter.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MP42/MP42SrtImporter.m b/MP42/MP42SrtImporter.m index a3f1e17..888797b 100644 --- a/MP42/MP42SrtImporter.m +++ b/MP42/MP42SrtImporter.m @@ -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]; } }