Fix crash bug in trackCloseContacts functionality

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5576 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Chris Morris 2012-12-14 18:24:19 +00:00
parent a894b4dd63
commit e64f74399d
3 changed files with 11 additions and 2 deletions

View File

@ -47,6 +47,7 @@
exception = yes;
exception.backtrace = no;
files.notFound = $error; // Failure to load a file.

View File

@ -1965,7 +1965,11 @@ ShipEntity* doOctreesCollide(ShipEntity* prime, ShipEntity* other)
// in checkCloseCollisionWith: we check if some thing has come within touch range (origin within our collision_radius)
// here we check if it has gone outside that range
NSString *other_key = nil;
foreachkey (other_key, closeContactsInfo)
// create a temp copy to iterate over, since we may want to
// change the original
NSDictionary *closeContactsTemp = [[NSDictionary alloc] initWithDictionary:closeContactsInfo];
foreachkey (other_key, closeContactsTemp)
{
ShipEntity* other = [UNIVERSE entityForUniversalID:[other_key intValue]];
if ((other != nil) && (other->isShip))
@ -2013,6 +2017,7 @@ ShipEntity* doOctreesCollide(ShipEntity* prime, ShipEntity* other)
[closeContactsInfo removeObjectForKey: other_key];
}
}
[closeContactsTemp release];
} // end if trackCloseContacts
} // end if !isSubEntity

View File

@ -337,7 +337,10 @@ static GameController *sSharedController = nil;
OOJSFrameCallbacksInvoke(delta_t);
}
}
@catch (id exception) {}
@catch (id exception)
{
OOLog(@"exception.backtrace",@"%@",[exception callStackSymbols]);
}
#if OOLITE_MAC_LEGACY_FULLSCREEN
if ([self inFullScreenMode])