Temporarily prevent crash in beam-1 VTest

When the first and/or ChordRest of a Beam is not a Chord
This commit is contained in:
Casper Jeukendrup 2021-12-06 20:32:21 +01:00 committed by Igor Korsukov
parent 0be27f69f6
commit 845d998799
2 changed files with 9 additions and 3 deletions

View file

@ -1000,8 +1000,14 @@ void Beam::layout2(std::vector<ChordRest*> chordRests, SpannerSegmentType, int f
// fix horizontal spacing of stems
LayoutBeams::respace(&chordRests);
}
Chord* startChord = toChord(chordRests[0]);
Chord* endChord = toChord(chordRests[chordRests.size() - 1]);
// FIXME
if (!chordRests.front()->isChord() || !chordRests.back()->isChord()) {
NOT_IMPL_RETURN;
}
Chord* startChord = toChord(chordRests.front());
Chord* endChord = toChord(chordRests.back());
// anchor represents the middle of the beam, not the tip of the stem
PointF startAnchor = chordBeamAnchor(startChord);

View file

@ -42,7 +42,7 @@
#define DEPRECATED LOGD() << "This function deprecated!!"
#define DEPRECATED_USE(use) LOGD() << "This function deprecated!! Use:" << use
#define NOT_IMPLEMENTED LOGW() << "Not implemented!!"
#define NOT_IMPL_RETURN NOT_IMPLEMENTED return
#define NOT_IMPL_RETURN NOT_IMPLEMENTED; return
#define NOT_SUPPORTED LOGW() << "Not supported!!"
#define NOT_SUPPORTED_USE(use) LOGW() << "Not supported!! Use:" << use