Fix crash: the ProjectileManager must be cleared before the CheckManager
(since a rubber ball will emove itself from all cannon checklines, so a crash happens if the checklines are gone).
This commit is contained in:
parent
1b75ed9b4c
commit
490bef516e
@ -436,6 +436,8 @@ World::~World()
|
||||
|
||||
irr_driver->onUnloadWorld();
|
||||
|
||||
projectile_manager->cleanup();
|
||||
|
||||
// In case that a race is aborted (e.g. track not found) track is 0.
|
||||
if(Track::getCurrentTrack())
|
||||
Track::getCurrentTrack()->cleanup();
|
||||
@ -486,8 +488,6 @@ World::~World()
|
||||
|
||||
Camera::removeAllCameras();
|
||||
|
||||
projectile_manager->cleanup();
|
||||
|
||||
// In case that the track is not found, Physics was not instantiated,
|
||||
// but kill handles this correctly.
|
||||
Physics::kill();
|
||||
|
Loading…
x
Reference in New Issue
Block a user