From 900bfdebb0e2d6ccaa570ce9b4c2bfde545c7d4c Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Thu, 1 May 2008 20:21:35 -0500 Subject: [PATCH] Fix invalid read reported by valgrind. --- Timeline/Timeline.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Timeline/Timeline.C b/Timeline/Timeline.C index 3f20cbe..ac0ab31 100644 --- a/Timeline/Timeline.C +++ b/Timeline/Timeline.C @@ -386,7 +386,7 @@ Timeline::draw_measure ( int X, int Y, int W, int H, Fl_Color color, bool BBT ) ++ntpi; 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 );