diff options
Diffstat (limited to 'synth')
-rw-r--r-- | synth/channel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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<NoteSkel*>::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() |