--- a/project_files/HedgewarsMobile/Classes/MissionTrainingViewController.m Sat Oct 24 02:26:54 2015 +0200
+++ b/project_files/HedgewarsMobile/Classes/MissionTrainingViewController.m Sat Oct 24 03:56:02 2015 +0200
@@ -135,6 +135,13 @@
NSUInteger firstDotLocation = [line rangeOfString:@"."].location;
NSString *missionID = [line substringToIndex:firstDotLocation];
+
+ NSString *missionFullPath = [NSString stringWithFormat:@"%@%@.lua", TRAININGS_DIRECTORY(), missionID];
+ if (![[NSFileManager defaultManager] fileExistsAtPath:missionFullPath])
+ {
+ continue;
+ }
+
NSString *nameOrDesc = [line substringFromIndex:firstDotLocation+1];
NSString *missionParsedName = ([nameOrDesc hasPrefix:@"name="]) ? [nameOrDesc stringByReplacingOccurrencesOfString:@"name=" withString:@""] : nil;