Avoid crash when early-exiting.
This is a work-around, but suitable for back-porting to 2020.3 Sentry-Id: FLIGHTGEAR-37D
This commit is contained in:
parent
c1f54779ac
commit
344058baba
1 changed files with 6 additions and 1 deletions
|
@ -208,7 +208,12 @@ FGModelMgr::bind ()
|
||||||
void
|
void
|
||||||
FGModelMgr::unbind ()
|
FGModelMgr::unbind ()
|
||||||
{
|
{
|
||||||
|
// work-around for FLIGHTGEAR-37D : crash when quitting during
|
||||||
|
// early startup
|
||||||
|
if (!_listener) {
|
||||||
_models->removeChangeListener(_listener.get());
|
_models->removeChangeListener(_listener.get());
|
||||||
|
}
|
||||||
|
|
||||||
_listener.reset();
|
_listener.reset();
|
||||||
_models.clear();
|
_models.clear();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue