From e194fc5ee4482fec483f6cf8dd5bed2551fa5ef5 Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Fri, 24 Mar 2023 23:30:25 +0100 Subject: [PATCH] Fix crash when deleting multiple macros in combination with a group --- src/macro-core/macro-tree.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/macro-core/macro-tree.cpp b/src/macro-core/macro-tree.cpp index a72fb7fb..aabb5e85 100644 --- a/src/macro-core/macro-tree.cpp +++ b/src/macro-core/macro-tree.cpp @@ -231,6 +231,10 @@ static inline int MacroIndexToModelIndex(int realIdx, const std::deque> ¯os) { + if (realIdx == -1) { + return -1; + } + int modelIdx = 0; bool inCollapsedGroup = false; uint32_t groupSize = 0;