diff --git a/src/Player.cpp b/src/Player.cpp index 98483728b7..c65d9ed1d4 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -2940,13 +2940,13 @@ void Player::RandomizeNotes( int iNoteRow ) int iNumOfTracks = m_NoteData.GetNumTracks(); for( int t=0; t+1 < iNumOfTracks; t++ ) { - const int iSwapWith = RandomInt( iNumOfTracks ); - /* Only swap a tap and an empty. */ NoteData::iterator iter = m_NoteData.FindTapNote( t, iNewNoteRow ); if( iter == m_NoteData.end(t) || iter->second.type != TapNote::tap ) continue; + const int iSwapWith = RandomInt( iNumOfTracks ); + // Make sure this is empty. if( m_NoteData.FindTapNote(iSwapWith, iNewNoteRow) != m_NoteData.end(iSwapWith) ) continue;