commit d647a8b4b7c5d6d92655a19f7d437d827417bc2d parent f03230058b6faa0ad32f863063fa2f9e3e6f5d44 Author: dsp56300 <dsp56300@users.noreply.github.com> Date: Wed, 7 Aug 2024 22:33:35 +0200 do not crash if part of multi is out of range Diffstat:
M | source/nord/n2x/n2xJucePlugin/n2xController.cpp | | | 6 | +++++- |
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/source/nord/n2x/n2xJucePlugin/n2xController.cpp b/source/nord/n2x/n2xJucePlugin/n2xController.cpp @@ -161,7 +161,11 @@ namespace n2xJucePlugin onProgramChanged(); const auto part = m_state.getMultiParam(n2x::SelectedChannel, 0); - setCurrentPart(part); + if(part < getPartCount()) // if have seen dumps that have invalid stuff in here + { + // we ignore this for now, is annoying if the selected part changes whenever we load a multi +// setCurrentPart(part); + } return true; }