Fix invalid read reported by valgrind.

This commit is contained in:
Jonathan Moore Liles 2008-05-01 20:21:35 -05:00
parent f17dac7c87
commit 900bfdebb0
1 changed files with 1 additions and 1 deletions

View File

@ -386,7 +386,7 @@ Timeline::draw_measure ( int X, int Y, int W, int H, Fl_Color color, bool BBT )
++ntpi; ++ntpi;
tp = (Tempo_Point*)(*tpi); tp = (Tempo_Point*)(*tpi);
const Tempo_Point *ntp = (Tempo_Point*)(*ntpi); const Tempo_Point *ntp = ntpi == tempo_track->_widgets.end() ? NULL : (Tempo_Point*)(*ntpi);
const nframes_t ntpo = ntp ? ntp->offset() : when + x_to_ts( W + 1 ); const nframes_t ntpo = ntp ? ntp->offset() : when + x_to_ts( W + 1 );