# HG changeset patch # User antonc27 # Date 1445646414 -7200 # Node ID e529b597f9d1f3a50e17f6e660531754deeae438 # Parent 4b833bb1621ccb21bd89c03eff15880d9e6f0520 - Possible fix for loading game styles scripts without .cfg file diff -r 4b833bb1621c -r e529b597f9d1 project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m Sat Oct 24 01:42:31 2015 +0200 +++ b/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m Sat Oct 24 02:26:54 2015 +0200 @@ -329,7 +329,7 @@ } else { - if (![scheme isEqualToString:@"*"]) + if (scheme && ![scheme isEqualToString:@"*"]) { NSString *correctScheme = [scheme stringByReplacingOccurrencesOfString:@"_" withString:@" "]; self.selectedScheme = [NSString stringWithFormat:@"%@.plist", correctScheme]; @@ -345,7 +345,7 @@ } else { - if (![weapon isEqualToString:@"*"]) + if (weapon && ![weapon isEqualToString:@"*"]) { NSString *correctWeapon = [weapon stringByReplacingOccurrencesOfString:@"_" withString:@" "]; self.selectedWeapon = [NSString stringWithFormat:@"%@.plist", correctWeapon];