Fix crash when pasting at beginning of document

This commit is contained in:
Matthias Neeracher 2011-08-29 02:54:08 +02:00
parent 67c9213ce9
commit 99d3afc833

View File

@ -1934,6 +1934,9 @@ void VLSong::PasteMeasures(size_t beginMeasure, const VLSong & measures, int mod
void VLSong::DeleteMeasures(size_t beginMeasure, size_t endMeasure, int mode) void VLSong::DeleteMeasures(size_t beginMeasure, size_t endMeasure, int mode)
{ {
if (beginMeasure == endMeasure)
return;
if (mode == kOverwriteMelody) { if (mode == kOverwriteMelody) {
for (size_t m=beginMeasure; m<endMeasure; ++m) { for (size_t m=beginMeasure; m<endMeasure; ++m) {
VLLyricsNote rest(Properties(m).fTime); VLLyricsNote rest(Properties(m).fTime);