Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2017-06-12 11:14:09 -0400
committerDoug Schaefer2017-06-12 11:14:54 -0400
commit4995ccbe248d3075ffa66109e32be0f172e97227 (patch)
tree307e3297c0732d8c3ccffa3823d376a553e0e112
parentc24e5d17b3863516ab776d2df6819804ffef0e52 (diff)
downloadorg.eclipse.cdt-4995ccbe248d3075ffa66109e32be0f172e97227.tar.gz
org.eclipse.cdt-4995ccbe248d3075ffa66109e32be0f172e97227.tar.xz
org.eclipse.cdt-4995ccbe248d3075ffa66109e32be0f172e97227.zip
Fix indexOutOfBounds when no Arduino boards registered.
-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 7251c25cc3..19704aae9a 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
@@ -199,6 +199,10 @@ public class ArduinoTerminalSettingsPage extends AbstractSettingsPage {
}
void updatePortLabel() {
+ if (boardCombo.getSelectionIndex() < 0) {
+ return;
+ }
+
String boardName = boardCombo.getItem(boardCombo.getSelectionIndex());
IRemoteConnection connection = arduinoType.getConnection(boardName);
if (connection != null) {

Back to the top