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();
|
irr_driver->onUnloadWorld();
|
||||||
|
|
||||||
|
projectile_manager->cleanup();
|
||||||
|
|
||||||
// In case that a race is aborted (e.g. track not found) track is 0.
|
// In case that a race is aborted (e.g. track not found) track is 0.
|
||||||
if(Track::getCurrentTrack())
|
if(Track::getCurrentTrack())
|
||||||
Track::getCurrentTrack()->cleanup();
|
Track::getCurrentTrack()->cleanup();
|
||||||
@ -486,8 +488,6 @@ World::~World()
|
|||||||
|
|
||||||
Camera::removeAllCameras();
|
Camera::removeAllCameras();
|
||||||
|
|
||||||
projectile_manager->cleanup();
|
|
||||||
|
|
||||||
// In case that the track is not found, Physics was not instantiated,
|
// In case that the track is not found, Physics was not instantiated,
|
||||||
// but kill handles this correctly.
|
// but kill handles this correctly.
|
||||||
Physics::kill();
|
Physics::kill();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user