1
0
Fork 0

src/Aircraft/replay.cxx: fixed potential segv when moving packest between medium/long term store.

This commit is contained in:
Julian Smith 2021-04-17 19:21:41 +01:00
parent 967cff2b6f
commit 3e57ba3332

View file

@ -1176,6 +1176,8 @@ FGReplay::update( double dt )
short_term.pop_front();
}
if (!medium_term.empty())
{
FGReplayData *mt_front = medium_term.front();
if ( sim_time - mt_front->sim_time > m_medium_res_time )
{
@ -1196,6 +1198,8 @@ FGReplay::update( double dt )
medium_term.pop_front();
}
if (!long_term.empty())
{
FGReplayData *lt_front = long_term.front();
if ( sim_time - lt_front->sim_time > m_low_res_time )
{
@ -1211,6 +1215,8 @@ FGReplay::update( double dt )
}
}
}
}
}
#if 0
cout << "short term size = " << short_term.size()