Fixed crash on entering witchspace.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1585 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
943c55e1f3
commit
206e883362
@ -3455,12 +3455,12 @@ NSComparisonResult planetSort(id i1, id i2, void* context)
|
||||
- (PlanetEntity *) findPlanetNearestSurface
|
||||
{
|
||||
NSMutableArray *planets = nil;
|
||||
NSArray *sortedPlanets = nil;
|
||||
NSArray *sortedPlanets = nil;
|
||||
|
||||
planets = (NSMutableArray *)[UNIVERSE planets];
|
||||
[planets addObject:[UNIVERSE sun]];
|
||||
|
||||
if ([planets count] == 0) return nil;
|
||||
|
||||
[planets addObject:[UNIVERSE sun]];
|
||||
|
||||
PlanetEntity* the_planet=[planets objectAtIndex:0];
|
||||
if ([planets count] >1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user