mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-23 07:58:05 +02:00
Fix possible assertion violations for cut, paste, trim
This commit is contained in:
parent
615a5058a7
commit
b2b9708b29
@ -495,7 +495,7 @@ bool NoteTrack::Trim(double t0, double t1)
|
||||
|
||||
void NoteTrack::Clear(double t0, double t1)
|
||||
{
|
||||
if (t1 <= t0)
|
||||
if (t1 < t0)
|
||||
THROW_INCONSISTENCY_EXCEPTION;
|
||||
|
||||
double len = t1-t0;
|
||||
|
@ -634,10 +634,10 @@ void WaveTrack::Trim (double t0, double t1)
|
||||
|
||||
//if inside0 is false, then the left selector was between
|
||||
//clips, so DELETE everything to its left.
|
||||
if(false == inside1)
|
||||
if(!inside1 && t1 < GetEndTime())
|
||||
Clear(t1,GetEndTime());
|
||||
|
||||
if(false == inside0)
|
||||
if(!inside0)
|
||||
SplitDelete(0,t0);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user