1
0
Fork 0

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:
James Turner 2021-03-23 17:07:59 +00:00
parent c1f54779ac
commit 344058baba

View file

@ -208,7 +208,12 @@ FGModelMgr::bind ()
void
FGModelMgr::unbind ()
{
// work-around for FLIGHTGEAR-37D : crash when quitting during
// early startup
if (!_listener) {
_models->removeChangeListener(_listener.get());
}
_listener.reset();
_models.clear();
}