1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-28 14:18:41 +02:00

Merge Bug1096: Fix crash changing view types

This commit is contained in:
Paul Licameli 2015-07-25 19:59:15 -04:00
commit fa115c4977

View File

@ -1661,9 +1661,9 @@ void FindWavePortions
for (int left = rect.x; left < rightmost;) { for (int left = rect.x; left < rightmost;) {
while (it != end && it->position <= left) while (it != end && it->position <= left)
prev = it++; prev = it++;
const int right = std::max(left, int( if (it == end)
it != end ? it->position : rightmost break;
)); const int right = std::max(left, int(it->position));
const int width = right - left; const int width = right - left;
if (width > 0) if (width > 0)
portions.push_back( portions.push_back(