fix possible AVs

This commit is contained in:
Chris Danford
2004-06-06 20:18:50 +00:00
parent f537c14175
commit f8c71ef85c
2 changed files with 9 additions and 2 deletions
+5 -2
View File
@@ -74,12 +74,15 @@ void CourseContentsList::SetFromGameState()
CourseEntryDisplay& display = m_CourseContentDisplays[m_iNumContents];
const TrailEntry* pte[NUM_PLAYERS];
ZERO( pte );
FOREACH_EnabledPlayer(pn)
{
Trail* pTrail = GAMESTATE->m_pCurTrail[pn];
if( pTrail == NULL )
continue;
pte[pn] = &pTrail->m_vEntries[i];
continue; // skip
if( i < pTrail->m_vEntries.size() )
pte[pn] = &pTrail->m_vEntries[i];
}
display.LoadFromTrailEntry( m_iNumContents+1, pte );