Skip to content

Fixed nullpointer exception in case of missing bootloader.path param #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/src/processing/app/debug/AvrdudeUploader.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private boolean uploadViaBootloader(String buildPath, String className)
// 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
// sketch.
if (boardPreferences.get("bootloader.path").equals("caterina")) {
if (boardPreferences.get("bootloader.path") != null && boardPreferences.get("bootloader.path").equals("caterina")) {
String caterinaUploadPort = null;
try {
// Toggle 1200 bps on selected serial port to force board reset.
Expand Down Expand Up @@ -178,7 +178,7 @@ private boolean uploadViaBootloader(String buildPath, String className)
// 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
// 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 {
Thread.sleep(500);
} catch (InterruptedException ex) { }
Expand Down