diff --git a/architecture/faust/gui/JuceGUI.h b/architecture/faust/gui/JuceGUI.h index 56f21324f7..ed796de5fc 100644 --- a/architecture/faust/gui/JuceGUI.h +++ b/architecture/faust/gui/JuceGUI.h @@ -819,7 +819,7 @@ class uiMenu : public uiComponent, private juce::ComboBox::Listener void comboBoxChanged (juce::ComboBox* cb) override { // -1 because of the starting item at 1 at the initialization, and protect against out of range access. - modifyZone(fValues[cb->getSelectedId() - 1]); + modifyZone(fValues[std::max(0, cb->getSelectedId() - 1])); } virtual void reflectZone() override