From 2604906b5db922e917060c65009555e8a7c42213 Mon Sep 17 00:00:00 2001 From: Casper Jeukendrup <48658420+cbjeukendrup@users.noreply.github.com> Date: Thu, 29 Jun 2023 19:28:59 +0200 Subject: [PATCH] Fix crash when Ctrl+Shift+Dragging Hairpin --- src/engraving/layout/v0/tlayout.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/engraving/layout/v0/tlayout.cpp b/src/engraving/layout/v0/tlayout.cpp index 83b5b1232225..a236acd6250a 100644 --- a/src/engraving/layout/v0/tlayout.cpp +++ b/src/engraving/layout/v0/tlayout.cpp @@ -2395,7 +2395,9 @@ void TLayout::layout(HairpinSegment* item, LayoutContext& ctx) Dynamic* sd = nullptr; Dynamic* ed = nullptr; double dymax = item->hairpin()->placeBelow() ? -10000.0 : 10000.0; - if (item->autoplace() && !ctx.isPaletteMode()) { + if (item->autoplace() && !ctx.isPaletteMode() + && item->explicitParent() // TODO: remove this line (this might happen when Ctrl+Shift+Dragging an item) + ) { Segment* start = item->hairpin()->startSegment(); Segment* end = item->hairpin()->endSegment(); // Try to fit between adjacent dynamics