diff --git a/Mage.Client/src/main/java/mage/client/tournament/TournamentPane.java b/Mage.Client/src/main/java/mage/client/tournament/TournamentPane.java index 0f05f36fb7..b833a3a0ff 100644 --- a/Mage.Client/src/main/java/mage/client/tournament/TournamentPane.java +++ b/Mage.Client/src/main/java/mage/client/tournament/TournamentPane.java @@ -55,7 +55,8 @@ public class TournamentPane extends MagePane { } public void hideTournament() { - tournamentPanel.hideTournament(); + tournamentPanel.cleanUp(); + removeFrame(); } public UUID getTournamentId() { diff --git a/Mage.Client/src/main/java/mage/client/tournament/TournamentPanel.java b/Mage.Client/src/main/java/mage/client/tournament/TournamentPanel.java index b63440b914..fb6273d5ab 100644 --- a/Mage.Client/src/main/java/mage/client/tournament/TournamentPanel.java +++ b/Mage.Client/src/main/java/mage/client/tournament/TournamentPanel.java @@ -117,6 +117,13 @@ public class TournamentPanel extends javax.swing.JPanel { } + public void cleanUp() { + this.stopTasks(); + if (this.chatPanel1 != null) { + this.chatPanel1.disconnect(); + } + } + private void saveDividerLocations() { // save panel sizes and divider locations. Rectangle rec = MageFrame.getDesktop().getBounds();