From 6a4297215dd48de6114eec6c24b6afda685c24d5 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sun, 5 Jul 2009 16:53:50 +0200 Subject: [PATCH] InstrumentTrack: fix crash in destructor with IPH-based instruments Commit e3fa8762ef0bcc785449351b4b889b8d4c86f1f5 introduced a crash in destructor of InstrumentTrack when using IPH based instruments. Therefore explicitely remove all play handles after calling silenceAllNotes(). Signed-off-by: Tobias Doerffel --- src/tracks/instrument_track.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tracks/instrument_track.cpp b/src/tracks/instrument_track.cpp index 4f7861a2b..9c421a78f 100644 --- a/src/tracks/instrument_track.cpp +++ b/src/tracks/instrument_track.cpp @@ -139,6 +139,8 @@ instrumentTrack::~instrumentTrack() // kill all running notes silenceAllNotes(); + engine::getMixer()->removePlayHandles( this ); + // now we're save deleting the instrument delete m_instrument; }