Skip to content

Commit

Permalink
Merge pull request #24389 from mathesoncalum/24363-new_part_crash
Browse files Browse the repository at this point in the history
Fix #24363: Crash on creating new part in some scores
  • Loading branch information
RomanPudashkin authored Sep 3, 2024
2 parents 9e85b91 + 87eaef1 commit 72f157f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/engraving/dom/segmentlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@ SegmentList SegmentList::clone() const

Segment* SegmentList::firstActive() const
{
Segment* segment = m_first;
if (segment->isActive()) {
return segment;
if (Segment* segment = m_first) {
return segment->isActive() ? segment : segment->nextActive();
}
return segment->nextActive();
return nullptr;
}

//---------------------------------------------------------
Expand Down

0 comments on commit 72f157f

Please sign in to comment.