From c14ace59f8868ef1664e157d54e886f7833b4997 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Fri, 26 Aug 2011 16:13:51 +0000 Subject: [PATCH] Some more robustness against corrupt documents --- Sources/VLLayout.cpp | 2 +- Sources/VLSheetView.mm | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/VLLayout.cpp b/Sources/VLLayout.cpp index b3859df..5e7f908 100644 --- a/Sources/VLLayout.cpp +++ b/Sources/VLLayout.cpp @@ -38,7 +38,7 @@ static size_t NextBreak(const VLSong & song, size_t after=0) VLLayout::VLLayout(const VLSong & song, float width) { - size_t nextBreak = NextBreak(song); + size_t nextBreak = song.fMeasures.empty() ? 0 : NextBreak(song); for (size_t meas = 0; measCountMeasures() != fLastMeasures) { [self recalculateDimensions]; rect = [self bounds];