AudioFileProcessor: fix crash with reversed samples
AudioFileProcessorWaveView::slideSampleByFrames() gets called before the knobs are created and/or after they are destroyed if the sample is reversed. Added checks for nonexistant knobs. Closes Patch #41 and Bug #525.
This commit is contained in:
committed by
Tobias Doerffel
parent
e29de773b3
commit
0f3851d597
@@ -932,8 +932,12 @@ void AudioFileProcessorWaveView::slideSampleByFrames( f_cnt_t _frames )
|
||||
return;
|
||||
}
|
||||
const double v = double( _frames ) / m_sampleBuffer.frames();
|
||||
m_startKnob->slideBy( v, false );
|
||||
m_endKnob->slideBy( v, false );
|
||||
if(m_startKnob) {
|
||||
m_startKnob->slideBy( v, false );
|
||||
}
|
||||
if(m_endKnob) {
|
||||
m_endKnob->slideBy( v, false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user