fix potential crash & add vtest

This commit is contained in:
Marc Sabatella 2015-02-11 15:51:41 -07:00
parent 8ceb2a4486
commit cdffb1c412
5 changed files with 6 additions and 2 deletions

View file

@ -456,6 +456,10 @@ void Spanner::computeEndElement()
switch (_anchor) {
case Anchor::SEGMENT: {
_endElement = score()->findCRinStaff(tick2() - 1, track2());
if (!_endElement) {
qDebug("%s no end element for tick %d", name(), tick2());
return;
}
int nticks = endCR()->tick() + endCR()->actualTicks() - _tick;
if (_ticks != nticks) {
qDebug("%s ticks changed, %d -> %d", name(), _ticks, nticks);

View file

@ -38,7 +38,7 @@ else
emmentaler-text-1 gonville-text-1 bravura-text-1 musejazz-text-1\
emmentaler-text-2 gonville-text-2 bravura-text-2 musejazz-text-2\
emmentaler-text-3 gonville-text-3 bravura-text-3 musejazz-text-3\
frametext ottava slurs-1 slurs-2 slurs-3 hairpins-1 pedal-1 line-1 line-2 line-3 line-4 gliss-1 gliss-2\
frametext ottava slurs-1 slurs-2 slurs-3 hairpins-1 pedal-1 line-1 line-2 line-3 line-4 line-5 gliss-1 gliss-2\
chord-layout-1 chord-layout-2 chord-layout-3 chord-layout-4 chord-layout-5\
chord-layout-6 chord-layout-7 chord-layout-8 chord-layout-9 chord-layout-10\
chord-layout-11 chord-layout-12 chord-layout-13 chord-layout-14 chord-layout-15 cross-1\

View file

@ -13,7 +13,7 @@ set SRC=mmrest-1,bravura-mmrest,gonville-mmrest,mmrest-2,mmrest-4,mmrest-5,mmres
emmentaler-text-1,gonville-text-1,bravura-text-1,musejazz-text-1, ^
emmentaler-text-2,gonville-text-2,bravura-text-2,musejazz-text-2, ^
emmentaler-text-3,gonville-text-3,bravura-text-3,musejazz-text-3, ^
frametext,ottava,slurs-1,slurs-2,slurs-3,hairpins-1,pedal-1,line-1,line-2,line-3,line-4,gliss-1,gliss-2, ^
frametext,ottava,slurs-1,slurs-2,slurs-3,hairpins-1,pedal-1,line-1,line-2,line-3,line-4,line-5,gliss-1,gliss-2, ^
chord-layout-1,chord-layout-2,chord-layout-3,chord-layout-4,chord-layout-5, ^
chord-layout-6,chord-layout-7,chord-layout-8,chord-layout-9,chord-layout-10, ^
chord-layout-11,chord-layout-12,chord-layout-13,chord-layout-14,chord-layout-15,cross-1, ^

BIN
vtest/line-5-ref.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
vtest/line-5.mscz Normal file

Binary file not shown.