Clear GroundLightManager on exit to avoid segfault
While mostly harmless since you're exiting anyway, it's an annoying distraction when the real problem is "unexpected exit" (e.g. https://bugs.debian.org/763285 ), and blocks testing with LeakSanitizer
This commit is contained in:
parent
84b240b84c
commit
033957003f
1 changed files with 4 additions and 0 deletions
|
@ -54,6 +54,7 @@ extern bool global_crashRptEnabled;
|
|||
#include <simgear/math/SGMath.hxx>
|
||||
#include <simgear/math/sg_random.h>
|
||||
#include <simgear/misc/strutils.hxx>
|
||||
#include <simgear/scene/tgdb/GroundLightManager.hxx>
|
||||
|
||||
#include <Model/panelnode.hxx>
|
||||
#include <Scenery/scenery.hxx>
|
||||
|
@ -529,6 +530,9 @@ int fgMainInit( int argc, char **argv )
|
|||
// delete the NavCache here. This will cause the destruction of many cached
|
||||
// objects (eg, airports, navaids, runways).
|
||||
delete flightgear::NavDataCache::instance();
|
||||
simgear::GroundLightManager::instance()->getRunwayLightStateSet()->clear();
|
||||
simgear::GroundLightManager::instance()->getTaxiLightStateSet()->clear();
|
||||
simgear::GroundLightManager::instance()->getGroundLightStateSet()->clear();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue