From 01450e8db068888c9ae7517db2ec024085056164 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Wed, 7 Jun 2017 11:12:27 -0400 Subject: [PATCH] Fix pasting into envelope with only one point... ... as reported by Steve, when applying a Nyquist effect. --- src/Envelope.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Envelope.cpp b/src/Envelope.cpp index 35e281184..63e93a617 100644 --- a/src/Envelope.cpp +++ b/src/Envelope.cpp @@ -894,7 +894,7 @@ std::pair< int, int > Envelope::ExpandRegion { // t0 is relative time - double val; + double val = GetValueRelative( t0 ); const auto range = EqualRange( t0, 0 ); // Preserve the left-side limit. @@ -904,7 +904,6 @@ std::pair< int, int > Envelope::ExpandRegion ; else { // Make a control point. - val = GetValueRelative( t0 ); Insert( range.first, EnvPoint{ t0, val } ); }