Bug 1626 - Preview of non-RTP effects fails if all the track is selected

A length of zero for silence to insert is allowed.  It means 'do nothing'.
This commit is contained in:
James Crook 2017-05-07 19:09:37 +01:00
parent b6d43e4954
commit 927c500acd
1 changed files with 4 additions and 0 deletions

View File

@ -1430,6 +1430,10 @@ void WaveTrack::Silence(double t0, double t1)
void WaveTrack::InsertSilence(double t, double len)
// STRONG-GUARANTEE
{
// Nothing to do, if length is zero.
// Fixes Bug 1626
if( len == 0 )
return;
if (len <= 0)
THROW_INCONSISTENCY_EXCEPTION;