Attempt to fix crash-on-exit seen for Windows
Can’t reproduce this crash but it’s happening for some users on Windows, so this should either fix it, or make the problem more obvious. Let’s see. https://sentry.io/organizations/flightgear/issues/1890563449
This commit is contained in:
parent
f2a96eaa6c
commit
cae06a79b7
1 changed files with 7 additions and 1 deletions
|
@ -249,6 +249,13 @@ FGGlobals::~FGGlobals()
|
||||||
delete initial_waypoints;
|
delete initial_waypoints;
|
||||||
delete channellist;
|
delete channellist;
|
||||||
|
|
||||||
|
// delete commands before we release the property root
|
||||||
|
// this avoids crash where commands might be storing a propery
|
||||||
|
// ref/pointer.
|
||||||
|
// see https://sentry.io/organizations/flightgear/issues/1890563449
|
||||||
|
delete commands;
|
||||||
|
commands = nullptr;
|
||||||
|
|
||||||
simgear::PropertyObjectBase::setDefaultRoot(NULL);
|
simgear::PropertyObjectBase::setDefaultRoot(NULL);
|
||||||
simgear::SGModelLib::resetPropertyRoot();
|
simgear::SGModelLib::resetPropertyRoot();
|
||||||
delete locale;
|
delete locale;
|
||||||
|
@ -258,7 +265,6 @@ FGGlobals::~FGGlobals()
|
||||||
|
|
||||||
props.clear();
|
props.clear();
|
||||||
|
|
||||||
delete commands;
|
|
||||||
delete simgear::ResourceManager::instance();
|
delete simgear::ResourceManager::instance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue