Fix crash when song ends on repeat

This commit is contained in:
Matthias Neeracher 2007-05-27 20:48:12 +00:00
parent 3e8ba7a75e
commit a65a85cadd

View File

@ -1729,9 +1729,13 @@ bool VLSong::DoesTieWithNextRepeat(size_t measure) const
VLSong::iterator::iterator(const VLSong & song, bool end) VLSong::iterator::iterator(const VLSong & song, bool end)
: fSong(song) : fSong(song)
{ {
fMeasure = end ? fSong.CountMeasures()-fSong.EmptyEnding() : 0; if (end) {
fMeasure = fSong.CountMeasures()-fSong.EmptyEnding();
} else {
fMeasure = 0;
AdjustStatus(); AdjustStatus();
} }
}
VLSong::iterator & VLSong::iterator::operator++() VLSong::iterator & VLSong::iterator::operator++()
{ {