mirror of https://github.com/noisymime/Arduino.git
SerialMonitor: dispose its window before setting its var to null, otherwise dangling disabled windows may occur. Fixes #3379
This commit is contained in:
parent
98eb1a9ee2
commit
a05c672750
|
@ -137,7 +137,7 @@ public class Editor extends JFrame implements RunnerListener {
|
||||||
|
|
||||||
private static JMenu portMenu;
|
private static JMenu portMenu;
|
||||||
|
|
||||||
static AbstractMonitor serialMonitor;
|
static volatile AbstractMonitor serialMonitor;
|
||||||
|
|
||||||
final EditorHeader header;
|
final EditorHeader header;
|
||||||
EditorStatus status;
|
EditorStatus status;
|
||||||
|
@ -2487,6 +2487,7 @@ public class Editor extends JFrame implements RunnerListener {
|
||||||
// The serial monitor already exists
|
// The serial monitor already exists
|
||||||
|
|
||||||
if (serialMonitor.isClosed()) {
|
if (serialMonitor.isClosed()) {
|
||||||
|
serialMonitor.dispose();
|
||||||
// If it's closed, clear the refrence to the existing
|
// If it's closed, clear the refrence to the existing
|
||||||
// monitor and create a new one
|
// monitor and create a new one
|
||||||
serialMonitor = null;
|
serialMonitor = null;
|
||||||
|
|
Loading…
Reference in New Issue