1
0
Fork 0

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:
James Turner 2020-09-14 11:04:53 +01:00
parent f2a96eaa6c
commit cae06a79b7

View file

@ -249,6 +249,13 @@ FGGlobals::~FGGlobals()
delete initial_waypoints;
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::SGModelLib::resetPropertyRoot();
delete locale;
@ -258,7 +265,6 @@ FGGlobals::~FGGlobals()
props.clear();
delete commands;
delete simgear::ResourceManager::instance();
}