Skip to content

Commit f9e7ccb

Browse files
committed
Prevent crash on loading filternode with less available channels
1 parent 0197362 commit f9e7ccb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Source/Processors/FilterNode/FilterNode.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ bool FilterNode::getBypassStatusForChannel(int chan)
205205

206206
void FilterNode::setFilterParameters(double lowCut, double highCut, int chan)
207207
{
208-
208+
if (channels.size()-1 < chan)
209+
return;
209210
Dsp::Params params;
210211
params[0] = channels[chan]->sampleRate; // sample rate
211212
params[1] = 2; // order

0 commit comments

Comments
 (0)