InstrumentSoundShaping: more sanity checking

This commit is contained in:
Tobias Doerffel
2014-01-26 23:14:59 +01:00
parent 09395a2f3e
commit db0570b130

View File

@@ -326,7 +326,8 @@ f_cnt_t InstrumentSoundShaping::releaseFrames() const
{
f_cnt_t ret_val = m_envLfoParameters[Volume]->isUsed() ?
m_envLfoParameters[Volume]->releaseFrames() : 0;
if( m_instrumentTrack->instrument()->desiredReleaseFrames() > ret_val )
if( m_instrumentTrack->instrument() &&
m_instrumentTrack->instrument()->desiredReleaseFrames() > ret_val )
{
ret_val = m_instrumentTrack->instrument()->desiredReleaseFrames();
}