From 06d897bc4d766a069a04949a1503ff6370c6ebc5 Mon Sep 17 00:00:00 2001 From: regulus79 <117475203+regulus79@users.noreply.github.com> Date: Sun, 4 May 2025 15:59:16 -0400 Subject: [PATCH] Fix crash when playing Pattern Editor without Pattern Track (#7862) Fixes a crash that occurs when attempting to play within the Pattern Editor with no Pattern Track created. --------- Co-authored-by: Sotonye Atemie --- src/core/Song.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Song.cpp b/src/core/Song.cpp index ad689107b..b052c775a 100644 --- a/src/core/Song.cpp +++ b/src/core/Song.cpp @@ -366,7 +366,7 @@ void Song::processAutomations(const TrackList &tracklist, TimePos timeStart, fpp break; case PlayMode::Pattern: { - Q_ASSERT(tracklist.size() == 1); + if (tracklist.empty()) { return; } Q_ASSERT(tracklist.at(0)->type() == Track::Type::Pattern); auto patternTrack = dynamic_cast(tracklist.at(0)); container = Engine::patternStore();