Trying to fix EnvironmentManager shutdown crash.
Not sure this will fix it, but it’s the only scenario I can spot so far, so let’s try anwyay. Reported at Sentry as: FLIGHTGEAR-8
This commit is contained in:
parent
4fe8a118cc
commit
11932bac4e
2 changed files with 7 additions and 10 deletions
src/Environment
|
@ -83,9 +83,6 @@ void FG3DCloudsListener::valueChanged( SGPropertyNode * node )
|
||||||
|
|
||||||
FGEnvironmentMgr::FGEnvironmentMgr () :
|
FGEnvironmentMgr::FGEnvironmentMgr () :
|
||||||
_environment(new FGEnvironment()),
|
_environment(new FGEnvironment()),
|
||||||
fgClouds(nullptr),
|
|
||||||
_cloudLayersDirty(true),
|
|
||||||
_3dCloudsEnableListener(nullptr),
|
|
||||||
_sky(globals->get_renderer()->getSky())
|
_sky(globals->get_renderer()->getSky())
|
||||||
{
|
{
|
||||||
fgClouds = new FGClouds;
|
fgClouds = new FGClouds;
|
||||||
|
@ -154,7 +151,7 @@ FGEnvironmentMgr::shutdown()
|
||||||
{
|
{
|
||||||
globals->get_event_mgr()->removeTask("updateClosestAirport");
|
globals->get_event_mgr()->removeTask("updateClosestAirport");
|
||||||
delete _multiplayerListener;
|
delete _multiplayerListener;
|
||||||
_multiplayerListener = NULL;
|
_multiplayerListener = nullptr;
|
||||||
SGSubsystemGroup::shutdown();
|
SGSubsystemGroup::shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,13 +92,13 @@ private:
|
||||||
double get_cloud_layer_maxalpha (int index ) const;
|
double get_cloud_layer_maxalpha (int index ) const;
|
||||||
void set_cloud_layer_maxalpha (int index, double maxalpha);
|
void set_cloud_layer_maxalpha (int index, double maxalpha);
|
||||||
|
|
||||||
FGEnvironment * _environment; // always the same, for now
|
FGEnvironment * _environment = nullptr; // always the same, for now
|
||||||
FGClouds *fgClouds;
|
FGClouds *fgClouds = nullptr;
|
||||||
bool _cloudLayersDirty;
|
bool _cloudLayersDirty = true;
|
||||||
simgear::TiedPropertyList _tiedProperties;
|
simgear::TiedPropertyList _tiedProperties;
|
||||||
SGPropertyChangeListener * _3dCloudsEnableListener;
|
SGPropertyChangeListener * _3dCloudsEnableListener = nullptr;
|
||||||
FGEnvironmentMgrMultiplayerListener * _multiplayerListener;
|
FGEnvironmentMgrMultiplayerListener * _multiplayerListener = nullptr;
|
||||||
SGSky* _sky;
|
SGSky* _sky = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _ENVIRONMENT_MGR_HXX
|
#endif // _ENVIRONMENT_MGR_HXX
|
||||||
|
|
Loading…
Add table
Reference in a new issue