Fix conditional on uninitialised idx (via n_samples) in framed curve.

- possibly fixes drawing artefacts in the tempo curve.
This commit is contained in:
nick_m 2016-06-02 01:11:23 +10:00
parent 46ae5aa9d1
commit 7e716d27a8

View File

@ -193,7 +193,7 @@ FramedCurve::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) c
left = idx;
}
for (Points::size_type idx = n_samples; idx > left + 1; --idx) {
for (Points::size_type idx = n_samples - 1; idx > left + 1; --idx) {
window_space = item_to_window (Duple (samples[idx].x, 0.0));
if (window_space.x <= draw.x1) break;
right = idx;