diff --git a/src/core/FxMixer.cpp b/src/core/FxMixer.cpp index 00143b2ee..5a2c8a272 100644 --- a/src/core/FxMixer.cpp +++ b/src/core/FxMixer.cpp @@ -529,7 +529,10 @@ FloatModel * FxMixer::channelSendModel( fx_ch_t fromChannel, fx_ch_t toChannel ) void FxMixer::mixToChannel( const sampleFrame * _buf, fx_ch_t _ch ) { - if( m_fxChannels[_ch]->m_muteModel.value() == false ) + // The first check is for the case where the last fxchannel was deleted but + // there was a race condition where it had to be processed. + if( _ch < m_fxChannels.size() && + m_fxChannels[_ch]->m_muteModel.value() == false ) { m_fxChannels[_ch]->m_lock.lock(); MixHelpers::add( m_fxChannels[_ch]->m_buffer, _buf, Engine::mixer()->framesPerPeriod() );