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,8 +1729,12 @@ bool VLSong::DoesTieWithNextRepeat(size_t measure) const
VLSong::iterator::iterator(const VLSong & song, bool end)
: fSong(song)
{
fMeasure = end ? fSong.CountMeasures()-fSong.EmptyEnding() : 0;
AdjustStatus();
if (end) {
fMeasure = fSong.CountMeasures()-fSong.EmptyEnding();
} else {
fMeasure = 0;
AdjustStatus();
}
}
VLSong::iterator & VLSong::iterator::operator++()