Crash when deleting start repeat in the first measure

• Mar 12, 2013 - 13:16
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Steps:
1- Create a new score;
2- Drag and drop a start repeat barline (Palettes -> Barlines -> Start Repeat) onto the first measure;
3- Select the start repeat;
4- Hit canc, or right-click + cut, or Ctrl+x (Windows) -> crash

Musescore Nightly build revision a3c9bc1
Windows XP Professional SP3

Additional notes:
- If the start repeat is dropped onto the first measure of a system different from the first one, selecting and cutting (or deleting) does not delete the start repeat barline. -> A different bug?

Analysis:
The crash occurs at line 1190 of libmscore\edit.cpp:
undoChangeProperty(m, P_REPEAT_FLAGS, m->repeatFlags() & ~RepeatStart);
because m is 0 (no measure before the first) in this case due to the instructions at lines 1187-1188
[m->prevMeasure() gives 0 when m is the first measure]


Comments