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:
Nikos Barkas 2008-04-26 11:49:59 +00:00
parent 943c55e1f3
commit 206e883362

View File

@ -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)