From 329785794b3807fc144310c65ce5d9fd9f026f5e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 3 Sep 2002 00:05:25 +0000 Subject: [PATCH] Fix crash when less than 30 played songs. --- stepmania/src/MusicWheel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index 456a7ae19d..d304fb9a61 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -477,7 +477,8 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr // break; case SORT_MOST_PLAYED: SortSongPointerArrayByMostPlayed( arraySongs ); - arraySongs.SetSize( 30 ); + if( arraySongs.GetSize() > 30 ) + arraySongs.SetSize( 30 ); break; default: ASSERT(0); // unhandled SortOrder