Skip to content

Commit

Permalink
audiowaveformview: clamp start to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmattkc committed Nov 30, 2020
1 parent d2727f1 commit 7dd9115
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/widget/viewer/audiowaveformview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ void AudioWaveformView::ForceUpdateOfRange(const TimeRange &range)
return;
}

int start_invalidate = in/cached_waveform_.size();
int start_invalidate = qMax(0, in/cached_waveform_.size());
int end_invalidate = qMin(cached_waveform_.size()-1, out/cached_waveform_.size());

for (int i=start_invalidate; i<=end_invalidate; i++) {
Expand Down

0 comments on commit 7dd9115

Please sign in to comment.