Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2017-06-12 14:35:48 -0400
committerDoug Schaefer2017-06-12 14:35:48 -0400
commitbfe45e8c74f297fbfaa89e9fc33527891207108e (patch)
treed525a2aff1b09494748b16f3804db716ad0fb083
parent4995ccbe248d3075ffa66109e32be0f172e97227 (diff)
downloadorg.eclipse.cdt-bfe45e8c74f297fbfaa89e9fc33527891207108e.tar.gz
org.eclipse.cdt-bfe45e8c74f297fbfaa89e9fc33527891207108e.tar.xz
org.eclipse.cdt-bfe45e8c74f297fbfaa89e9fc33527891207108e.zip
Fix another IndexOutOfBounds exception.CDT_9_3_RC4CDT_9_3_0
-rw-r--r--toolchains/arduino/org.eclipse.cdt.arduino.ui/src/org/eclipse/cdt/arduino/ui/internal/terminal/ArduinoTerminalSettingsPage.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/toolchains/arduino/org.eclipse.cdt.arduino.ui/src/org/eclipse/cdt/arduino/ui/internal/terminal/ArduinoTerminalSettingsPage.java b/toolchains/arduino/org.eclipse.cdt.arduino.ui/src/org/eclipse/cdt/arduino/ui/internal/terminal/ArduinoTerminalSettingsPage.java
index 19704aae9a..288a09a709 100644
--- a/toolchains/arduino/org.eclipse.cdt.arduino.ui/src/org/eclipse/cdt/arduino/ui/internal/terminal/ArduinoTerminalSettingsPage.java
+++ b/toolchains/arduino/org.eclipse.cdt.arduino.ui/src/org/eclipse/cdt/arduino/ui/internal/terminal/ArduinoTerminalSettingsPage.java
@@ -263,6 +263,10 @@ public class ArduinoTerminalSettingsPage extends AbstractSettingsPage {
@Override
public void saveSettings() {
+ if (boardCombo.getSelectionIndex() < 0) {
+ return;
+ }
+
settings.setBoardName(boardCombo.getItem(boardCombo.getSelectionIndex()));
settings.setPortName(portNameLabel.getText());
settings.setBaudRate(BaudRate.fromStringIndex(baudRateCombo.getSelectionIndex()));

Back to the top