summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drumgizmo.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc
index d84799d..a38186f 100644
--- a/src/drumgizmo.cc
+++ b/src/drumgizmo.cc
@@ -352,8 +352,9 @@ void DrumGizmo::getSamples(int ch, int pos, sample_t* s, size_t sz)
if(!af.isLoaded() || !af.isValid() || (s == nullptr))
{
- removeevent = true;
- break;
+ // This event cannot be played - schedule for deletion and continue.
+ to_remove.push_back(sample_event.id);
+ continue;
}
if(sample_event.offset > (pos + sz))