Don't check unspecified CC conditions

This commit is contained in:
Paul Fd 2021-11-15 00:18:07 +01:00
parent 37613d528c
commit 44d1ded4d5

View file

@ -147,7 +147,12 @@ void Layer::updateCCState(int ccNumber, float ccValue) noexcept
sostenutoPressed_ = newState;
}
if (region.ccConditions.getWithDefault(ccNumber).containsWithEnd(ccValue))
const auto conditions = region.ccConditions.get(ccNumber);
if (!conditions)
return;
if (conditions->containsWithEnd(ccValue))
ccSwitched_.set(ccNumber, true);
else
ccSwitched_.set(ccNumber, false);