From 8809d2009ef182a43b25ac752f795e85021ad7ee Mon Sep 17 00:00:00 2001 From: Vecais Dumais Laacis Date: Tue, 7 Aug 2007 11:38:17 +0000 Subject: [PATCH] clear cached trails on init --- stepmania/src/ScreenSelectMusic.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index ca8f8dcdef..4190bb4e78 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -84,6 +84,13 @@ void ScreenSelectMusic::Init() ScreenWithMenuElements::Init(); + //clear cached trails if any - cached trails points to already freed data if returning to select course after course played + SONGMAN->InvalidateCachedTrails(); + FOREACH_ENUM( PlayerNumber, p ) + { + GAMESTATE->m_pCurTrail[p].Set( NULL ); + } + /* Cache: */ m_sSectionMusicPath = THEME->GetPathS(m_sName,"section music"); m_sSortMusicPath = THEME->GetPathS(m_sName,"sort music");