diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index 3ee5a66eec..52595e65ee 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -392,7 +392,8 @@ void Course::Save( CString sPath, bool bSavingCache ) CString s; FOREACHS_CONST( CourseDifficulty, m_vDifficultiesToHide, cd ) s += CourseDifficultyToString( *cd ) + ','; - s.erase( s.end()-1 ); // erase last ',' + if( !s.empty() ) + s.erase( s.end()-1 ); // erase last ',' f.PutLine( "#DIFFICULTIESTOHIDE:" + s + ";" ); }