mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-15 12:29:26 +01:00
avoid NPE if serial monitor is waiting too long for opening
This commit is contained in:
parent
821c665460
commit
52ef55380d
@ -2442,13 +2442,14 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (serialMonitor != null)
|
if (serialMonitor != null) {
|
||||||
serialMonitor.resume(boardPort);
|
|
||||||
if (boardPort == null) {
|
|
||||||
serialMonitor.close();
|
|
||||||
handleSerial();
|
|
||||||
} else {
|
|
||||||
serialMonitor.resume(boardPort);
|
serialMonitor.resume(boardPort);
|
||||||
|
if (boardPort == null) {
|
||||||
|
serialMonitor.close();
|
||||||
|
handleSerial();
|
||||||
|
} else {
|
||||||
|
serialMonitor.resume(boardPort);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
statusError(e);
|
statusError(e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user