mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-09 22:24:14 +03:00
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
This commit is contained in:
@@ -85,7 +85,7 @@ public class AvrdudeUploader extends Uploader {
|
|||||||
// this wait a moment for the bootloader to enumerate. On Windows, also must
|
// this wait a moment for the bootloader to enumerate. On Windows, also must
|
||||||
// deal with the fact that the COM port number changes from bootloader to
|
// deal with the fact that the COM port number changes from bootloader to
|
||||||
// sketch.
|
// sketch.
|
||||||
if (boardPreferences.get("bootloader.path").equals("caterina")) {
|
if (boardPreferences.get("bootloader.path") != null && boardPreferences.get("bootloader.path").equals("caterina")) {
|
||||||
String caterinaUploadPort = null;
|
String caterinaUploadPort = null;
|
||||||
try {
|
try {
|
||||||
// Toggle 1200 bps on selected serial port to force board reset.
|
// Toggle 1200 bps on selected serial port to force board reset.
|
||||||
@@ -178,7 +178,7 @@ public class AvrdudeUploader extends Uploader {
|
|||||||
// port reconnects (or timeout after a few seconds if the sketch port never comes back).
|
// port reconnects (or timeout after a few seconds if the sketch port never comes back).
|
||||||
// Doing this saves users from accidentally opening Serial Monitor on the soon-to-be-orphaned
|
// Doing this saves users from accidentally opening Serial Monitor on the soon-to-be-orphaned
|
||||||
// bootloader port.
|
// bootloader port.
|
||||||
if (true == avrdudeResult && boardPreferences.get("bootloader.path").equals("caterina")) {
|
if (true == avrdudeResult && boardPreferences.get("bootloader.path") != null && boardPreferences.get("bootloader.path").equals("caterina")) {
|
||||||
try {
|
try {
|
||||||
Thread.sleep(500);
|
Thread.sleep(500);
|
||||||
} catch (InterruptedException ex) { }
|
} catch (InterruptedException ex) { }
|
||||||
|
Reference in New Issue
Block a user