mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-13 10:29:35 +01:00
Avoid NPE and spurious unlock if serial monitor is clicked at upload warmup
This commit is contained in:
parent
13b74f5ccb
commit
b2235c3a4a
@ -1927,7 +1927,9 @@ public class Base {
|
||||
this.handleFontSizeChange(-1);
|
||||
}
|
||||
} else {
|
||||
e.getComponent().getParent().dispatchEvent(e);
|
||||
if (e.getComponent() != null && e.getComponent().getParent() != null) {
|
||||
e.getComponent().getParent().dispatchEvent(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -2060,6 +2060,8 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
|
||||
public void run() {
|
||||
try {
|
||||
uploading = true;
|
||||
|
||||
removeAllLineHighlights();
|
||||
if (serialMonitor != null) {
|
||||
serialMonitor.suspend();
|
||||
@ -2068,8 +2070,6 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
serialPlotter.suspend();
|
||||
}
|
||||
|
||||
uploading = true;
|
||||
|
||||
boolean success = sketchController.exportApplet(usingProgrammer);
|
||||
if (success) {
|
||||
statusNotice(tr("Done uploading."));
|
||||
|
Loading…
x
Reference in New Issue
Block a user