Fix an MSVC debug crash.
Ensure the route-manger unregisters itself from the flightplan on destruction, since it is a delegate.
This commit is contained in:
parent
6845ff56f3
commit
47ecc0ce29
1 changed files with 4 additions and 0 deletions
|
@ -234,6 +234,10 @@ FGRouteMgr::~FGRouteMgr()
|
|||
input->removeChangeListener(listener);
|
||||
delete listener;
|
||||
|
||||
if (_plan) {
|
||||
_plan->removeDelegate(this);
|
||||
}
|
||||
|
||||
//SGCommandMgr* cmdMgr = SGCommandMgr::instance();
|
||||
//cmdMgr->removeCommand("define-user-waypoint");
|
||||
|
||||
|
|
Loading…
Reference in a new issue