Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Incorporate Debian patch to avoid infinite recursion
Now exits properly with an error if core descriptions.plist can't be found
  • Loading branch information
cim-- committed Sep 6, 2015
1 parent e12a9ab commit 134b07b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Core/Universe.m
Expand Up @@ -7446,11 +7446,15 @@ - (void) verifyDescriptions
-- Ahruman 2011-05-05
*/

NSDictionary *descriptions = [self descriptions];
NSString *key = nil;
foreachkey (key, descriptions)
if (_descriptions == nil)
{
VerifyDesc(key, [descriptions objectForKey:key]);
OOLog(@"descriptions.verify",@"***** FATAL: Tried to verify descriptions, but descriptions was nil - unable to load any descriptions.plist file.");
exit(EXIT_FAILURE);
}
foreachkey (key, _descriptions)
{
VerifyDesc(key, [_descriptions objectForKey:key]);
}
}

Expand Down Expand Up @@ -7479,7 +7483,6 @@ - (void) loadScenarios
{
[_scenarios autorelease];
_scenarios = [[ResourceManager arrayFromFilesNamed:@"scenarios.plist" inFolder:@"Config" andMerge:YES] retain];
[self verifyDescriptions];
}


Expand Down

0 comments on commit 134b07b

Please sign in to comment.