From 3bb1045ce13eebbd13570109126528c53a1ffc21 Mon Sep 17 00:00:00 2001 From: Jonathan Albert <47063257+jalbert-dev@users.noreply.github.com> Date: Thu, 16 May 2019 21:12:32 -0400 Subject: [PATCH] Fix crash when getting matching steps in endless courses --- src/StepsUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StepsUtil.cpp b/src/StepsUtil.cpp index 6df151b2c5..7f82eb9112 100644 --- a/src/StepsUtil.cpp +++ b/src/StepsUtil.cpp @@ -74,7 +74,7 @@ void StepsUtil::GetAllMatchingEndless( Song *pSong, const StepsCriteria &stc, ve successful = true; } - if( !successful ) + if( !successful && vSteps.size() > 0 ) { Difficulty difficulty = ( *( vSteps.begin() ) )->GetDifficulty(); Difficulty previousDifficulty = difficulty;