From 83ac0e7ab2e068e0e0894f6d96a08026fe9df13f Mon Sep 17 00:00:00 2001 From: Yinan Zhou Date: Mon, 14 Aug 2023 16:56:28 -0400 Subject: [PATCH] Break when last element --- src/editortoolkit_neume.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/editortoolkit_neume.cpp b/src/editortoolkit_neume.cpp index 9e35505ccd3..270ac94a86a 100644 --- a/src/editortoolkit_neume.cpp +++ b/src/editortoolkit_neume.cpp @@ -2811,6 +2811,7 @@ bool EditorToolkitNeume::Ungroup(std::string groupType, std::vector fparent->ReorderByXPos(); uuidArray << (*it); it = elementIds.erase(it); + if (it == elementIds.end()) break; el = m_doc->GetDrawingPage()->FindDescendantByID(*it); } }