The prototype of update_metar_properties does not match overridden func.
trafficmgr: iterators below begin() and after end().
tower.cxx : iterator incrementing beyond end().
circuitListItr = circuitList.erase(circuitListItr);
if(circuitListItr == circuitList.end() ) {
circuitListItr = circuitList.begin();
+ // avoid increment of circuitListItr (would increment to second element, or crash if no element left)
+ return;
}
}
++circuitListItr;
// copy from FGMetarEnvironmentCtrl until better
void
-FGClouds::update_metar_properties( FGMetar *m )
+FGClouds::update_metar_properties( const FGMetar *m )
{
int i;
double d;
void setLayer( int iLayer, float alt_m, const string& coverage, const string& layer_type );
- void update_metar_properties( FGMetar *m );
+ void update_metar_properties( const FGMetar *m );
void FGClouds::update_env_config ();
{
currAircraft=scheduledAircraft.erase(currAircraft);
//cerr << "Erasing " << currAircraft->getRegistration() << endl;
- currAircraft--;
}
else
{
void FGTrafficManager::update(double something)
{
time_t now = time(NULL) + fgGetLong("/sim/time/warp");
+ if (scheduledAircraft.size() == 0)
+ return;
if(currAircraft == scheduledAircraft.end())
{
//cerr << "resetting schedule " << endl;