Skip to content

Commit

Permalink
Fix GH#19322: [MusicXML Import] Crash if stop wavy-line is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz committed Sep 8, 2023
1 parent b49a732 commit b85d63c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/engraving/playback/filters/spannerfilter.cpp
Expand Up @@ -53,7 +53,10 @@ bool SpannerFilter::isPlayable(const EngravingItem* item, const RenderingContext
int SpannerFilter::spannerActualDurationTicks(const Spanner* spanner, const int nominalDurationTicks)
{
if (spanner->type() == ElementType::TRILL) {
return spanner->endSegment()->tick().ticks() - spanner->tick().ticks() - 1;
if (spanner->endSegment()) {
return spanner->endSegment()->tick().ticks() - spanner->tick().ticks() - 1;
}
LOGW("Trill without `endSegment()`, ignoring it");
}

if (spanner->type() == ElementType::PEDAL) {
Expand Down

0 comments on commit b85d63c

Please sign in to comment.