Skip to content

Commit

Permalink
Fix crash when no parameters are provided by protecting against out o…
Browse files Browse the repository at this point in the history
…f bounds array access when accessing first parameter. Now displays an error message instead.
  • Loading branch information
tewha committed Jan 24, 2013
1 parent 05d4d44 commit 162406e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Application/GBAppledocApplication.m
Expand Up @@ -512,6 +512,8 @@ - (NSString *)combineBasePath:(NSString *)base withRelativePath:(NSString *)path


- (void)injectXcodeSettingsFromArguments:(NSArray *)arguments { - (void)injectXcodeSettingsFromArguments:(NSArray *)arguments {
//check if even deal with a project //check if even deal with a project
if([arguments count] < 2)
return;
NSString *path = [arguments objectAtIndex:1]; NSString *path = [arguments objectAtIndex:1];
if(![path.pathExtension isEqualToString:@"xcodeproj"]) if(![path.pathExtension isEqualToString:@"xcodeproj"])
return; return;
Expand Down

0 comments on commit 162406e

Please sign in to comment.