diff --git a/Mage.Client/src/main/java/mage/client/MageFrame.java b/Mage.Client/src/main/java/mage/client/MageFrame.java index a024a29ece..5f4231fcf1 100644 --- a/Mage.Client/src/main/java/mage/client/MageFrame.java +++ b/Mage.Client/src/main/java/mage/client/MageFrame.java @@ -415,19 +415,21 @@ public class MageFrame extends javax.swing.JFrame implements MageClient { MagePaneMenuItem menuItem; for (int i = 0; i < windows.length; i++) { - MagePane window = (MagePane) windows[i]; - if (window.isVisible()) { - menuItem = new MagePaneMenuItem(window); - menuItem.setState(i == 0); - menuItem.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent ae) { - MagePane frame = ((MagePaneMenuItem) ae.getSource()).getFrame(); - setActive(frame); - } - }); - menuItem.setIcon(window.getFrameIcon()); - menu.add(menuItem); + if (windows[i] instanceof MagePane) { + MagePane window = (MagePane) windows[i]; + if (window.isVisible()) { + menuItem = new MagePaneMenuItem(window); + menuItem.setState(i == 0); + menuItem.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent ae) { + MagePane frame = ((MagePaneMenuItem) ae.getSource()).getFrame(); + setActive(frame); + } + }); + menuItem.setIcon(window.getFrameIcon()); + menu.add(menuItem); + } } }