From 528902f28af1bb430ba7c7f1bf4ebbc54fb7aaf6 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Tue, 11 Jan 2011 20:29:34 +0100 Subject: Fixed bug in Channel::cleanup() (some notes were skipped) --- synth/channel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/synth/channel.cpp b/synth/channel.cpp index 61ea6de..8ff615e 100644 --- a/synth/channel.cpp +++ b/synth/channel.cpp @@ -39,12 +39,14 @@ Channel::~Channel() void Channel::cleanup() { list::iterator it; - for (it=notes.begin(); it!=notes.end(); it++) + for (it=notes.begin(); it!=notes.end();) if ((*it)->still_active()==false) { (*it)->destroy(); it=notes.erase(it); } + else + it++; } fixed_t Channel::get_sample() -- cgit v1.2.1