From db0570b1309a4faceffd6facc5e58eb7df7521c4 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sun, 26 Jan 2014 23:14:59 +0100 Subject: [PATCH] InstrumentSoundShaping: more sanity checking --- src/core/InstrumentSoundShaping.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/InstrumentSoundShaping.cpp b/src/core/InstrumentSoundShaping.cpp index 535a0d99d..16a6f5050 100644 --- a/src/core/InstrumentSoundShaping.cpp +++ b/src/core/InstrumentSoundShaping.cpp @@ -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(); }