From 97c77d173a241d83fd2b43efc213767432a8421d Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 20 Dec 2023 20:50:39 -0800 Subject: [PATCH] adv pattern select fix --- VortexEngine/src/Menus/MenuList/PatternSelect.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/VortexEngine/src/Menus/MenuList/PatternSelect.cpp b/VortexEngine/src/Menus/MenuList/PatternSelect.cpp index f5e75c7635..ccae0f561f 100644 --- a/VortexEngine/src/Menus/MenuList/PatternSelect.cpp +++ b/VortexEngine/src/Menus/MenuList/PatternSelect.cpp @@ -58,7 +58,11 @@ void PatternSelect::onShortClick() // double click = skip 10 bool doSkip = g_pButton->onConsecutivePresses(2); MAP_FOREACH_LED(m_targetLeds) { - uint8_t &arg = m_previewMode.getPattern(pos)->argRef(m_argIndex); + Pattern *pat = m_previewMode.getPattern(pos); + if (pat->getNumArgs() <= m_argIndex) { + continue; + } + uint8_t &arg = pat->argRef(m_argIndex); if (doSkip) { arg += 10 - (arg % 10); } else {