diff --git a/include/sst/voicemanager/managers/polymanager.h b/include/sst/voicemanager/managers/polymanager.h index 136f350..953accb 100644 --- a/include/sst/voicemanager/managers/polymanager.h +++ b/include/sst/voicemanager/managers/polymanager.h @@ -383,7 +383,7 @@ template struct { for (auto &vi : voiceInfo) { - if (vi.port == port && vi.channel == channel && vi.gated) + if (vi.activeVoiceCookie && vi.port == port && vi.channel == channel && vi.gated) { responder.setVoiceMIDIMPETimbre(vi.activeVoiceCookie, val); } @@ -394,7 +394,7 @@ template struct { for (auto &vi : voiceInfo) { - if (vi.port == port && vi.channel == channel && vi.gated) + if (vi.activeVoiceCookie && vi.port == port && vi.channel == channel && vi.gated) { responder.setVoiceMIDIMPEChannelPressure(vi.activeVoiceCookie, val); }