From fe3e0b76998439a787a730ef870a322f0ac59c3f Mon Sep 17 00:00:00 2001 From: "james.k.crook@gmail.com" Date: Wed, 18 Sep 2013 20:55:04 +0000 Subject: [PATCH] Fixed bug (ASSERT) when adding a click track after adding a chirp (and unselecting) when sync-lock is enabled. --- src/WaveTrack.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/WaveTrack.cpp b/src/WaveTrack.cpp index c678408f8..7b45d0ba3 100644 --- a/src/WaveTrack.cpp +++ b/src/WaveTrack.cpp @@ -892,7 +892,10 @@ bool WaveTrack::SyncLockAdjust(double oldT1, double newT1) if (newT1 > oldT1) { // Insert space within the track - if (oldT1 > GetEndTime()) + // JKC: This is a rare case where using >= rather than > on a float matters. + // GetEndTime() looks through the clips and may give us EXACTLY the same + // value as T1, when T1 was set to be at the end of one of those clips. + if (oldT1 >= GetEndTime()) return true; // If track is empty at oldT1 insert whitespace; otherwise, silence