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:
parent
a894b4dd63
commit
e64f74399d
@ -47,6 +47,7 @@
|
||||
|
||||
|
||||
exception = yes;
|
||||
exception.backtrace = no;
|
||||
|
||||
|
||||
files.notFound = $error; // Failure to load a 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
|
||||
|
@ -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])
|
||||
|
Loading…
x
Reference in New Issue
Block a user