mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
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;
|
||||
|
||||
static AbstractMonitor serialMonitor;
|
||||
static volatile AbstractMonitor serialMonitor;
|
||||
|
||||
final EditorHeader header;
|
||||
EditorStatus status;
|
||||
@ -2487,6 +2487,7 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
// The serial monitor already exists
|
||||
|
||||
if (serialMonitor.isClosed()) {
|
||||
serialMonitor.dispose();
|
||||
// If it's closed, clear the refrence to the existing
|
||||
// monitor and create a new one
|
||||
serialMonitor = null;
|
||||
|
Loading…
Reference in New Issue
Block a user