src/Aircraft/replay.cxx: fixed potential segv when moving packest between medium/long term store.
This commit is contained in:
parent
967cff2b6f
commit
3e57ba3332
1 changed files with 28 additions and 22 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue