Skip to content

Commit 002baa7

Browse files
committed
Merge pull request #94 from feka/master
Fixed nullpointer exception in case of missing bootloader.path param http://code.google.com/p/arduino/issues/detail?id=919
2 parents 308d907 + ec3c812 commit 002baa7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/processing/app/debug/AvrdudeUploader.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private boolean uploadViaBootloader(String buildPath, String className)
8585
// this wait a moment for the bootloader to enumerate. On Windows, also must
8686
// deal with the fact that the COM port number changes from bootloader to
8787
// sketch.
88-
if (boardPreferences.get("bootloader.path").equals("caterina")) {
88+
if (boardPreferences.get("bootloader.path") != null && boardPreferences.get("bootloader.path").equals("caterina")) {
8989
String caterinaUploadPort = null;
9090
try {
9191
// Toggle 1200 bps on selected serial port to force board reset.
@@ -178,7 +178,7 @@ private boolean uploadViaBootloader(String buildPath, String className)
178178
// port reconnects (or timeout after a few seconds if the sketch port never comes back).
179179
// Doing this saves users from accidentally opening Serial Monitor on the soon-to-be-orphaned
180180
// bootloader port.
181-
if (true == avrdudeResult && boardPreferences.get("bootloader.path").equals("caterina")) {
181+
if (true == avrdudeResult && boardPreferences.get("bootloader.path") != null && boardPreferences.get("bootloader.path").equals("caterina")) {
182182
try {
183183
Thread.sleep(500);
184184
} catch (InterruptedException ex) { }

0 commit comments

Comments
 (0)