Fix uninitialized variable valgrind warning
This commit is contained in:
parent
86f82994be
commit
64ae52438b
1 changed files with 4 additions and 3 deletions
|
@ -365,11 +365,12 @@ bool FGStgTerrain::scenery_available(const SGGeod& position, double range_m)
|
|||
{
|
||||
if( schedule_scenery(position, range_m, 0.0) )
|
||||
{
|
||||
double elev;
|
||||
double elev = 0.0;
|
||||
|
||||
bool use_vpb = globals->get_props()->getNode("scenery/use-vpb")->getBoolValue();
|
||||
bool got_elev = get_elevation_m(SGGeod::fromGeodM(position, SG_MAX_ELEVATION_M), elev, 0, 0);
|
||||
|
||||
if (!use_vpb && !get_elevation_m(SGGeod::fromGeodM(position, SG_MAX_ELEVATION_M), elev, 0, 0))
|
||||
if (!use_vpb && !got_elev)
|
||||
{
|
||||
SG_LOG(SG_TERRAIN, SG_DEBUG, "FGStgTerrain::scenery_available - false" );
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue