1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-24 16:20:05 +02:00

Bug1096: Fix crash changing view types

This commit is contained in:
Paul Licameli 2015-07-25 19:58:24 -04:00
parent 9df30a63e9
commit 03984c48a5

View File

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