1
0
Fork 0

Potential fix for airports that could generate FPE on simgear load

This commit is contained in:
Peter Sadrozinski 2013-10-17 22:51:07 -04:00 committed by Martin Spott
parent 7cca6919ab
commit c55eaeeb1d

View file

@ -1078,6 +1078,8 @@ void Airport::BuildBtg(const std::string& root, const string_list& elev_src )
// on flag) and do so, then output next structures.
// for ( unsigned int i = 0; i < rwy_lights.size(); ++i )
for ( unsigned int i = 0; i < rwy_lights.size(); ++i )
{
if ( rwy_lights[i].ContourSize() )
{
pt_v.clear();
pt_n.clear();
@ -1089,10 +1091,12 @@ void Airport::BuildBtg(const std::string& root, const string_list& elev_src )
index = normals.add( rwy_lights[i].GetNormal(j) );
pt_n.push_back( index );
}
pts_v.push_back( pt_v );
pts_n.push_back( pt_n );
pt_materials.push_back( rwy_lights[i].GetType() );
}
}
// calculate node elevations
TG_LOG(SG_GENERAL, SG_DEBUG, "Computing airport node elevations");