1
0
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:
Federico Fissore 2015-06-23 16:40:21 +02:00
parent 98eb1a9ee2
commit a05c672750

View File

@ -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;