mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-05 14:49:25 +02:00
Bug2170: Crash using Trim twice with unchanged selection...
... bug resulted from Envelope rewrites in 2.2.0 and not recent restructurings.
This commit is contained in:
parent
d6768f9112
commit
e0fc7e7980
@ -420,7 +420,12 @@ void Envelope::CollapseRegion( double t0, double t1, double sampleDur )
|
||||
// We will keep the last (or only) point that was at t1.
|
||||
--end;
|
||||
|
||||
mEnv.erase( mEnv.begin() + begin, mEnv.begin() + end );
|
||||
if ( end < begin ) {
|
||||
if ( leftPoint )
|
||||
rightPoint = false;
|
||||
}
|
||||
else
|
||||
mEnv.erase( mEnv.begin() + begin, mEnv.begin() + end );
|
||||
|
||||
// Shift points left after deleted region.
|
||||
auto len = mEnv.size();
|
||||
|
Loading…
x
Reference in New Issue
Block a user