From 99d3afc8332d0efd730a96ef1d2137a45a00b0e5 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Mon, 29 Aug 2011 02:54:08 +0200 Subject: [PATCH] Fix crash when pasting at beginning of document --- Sources/VLModel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/VLModel.cpp b/Sources/VLModel.cpp index a4b73bd..3539acc 100644 --- a/Sources/VLModel.cpp +++ b/Sources/VLModel.cpp @@ -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) { + if (beginMeasure == endMeasure) + return; + if (mode == kOverwriteMelody) { for (size_t m=beginMeasure; m