From f53d825915e01697f0ff1724ba021dc6f1a3257b Mon Sep 17 00:00:00 2001 From: Honfika Date: Sun, 24 Nov 2013 22:20:56 +0100 Subject: [PATCH] non null flashPanel is always instance of FlashPlayerPanel --- .../jpexs/decompiler/flash/gui/MainFrame.java | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java index a9d612dae..6cd966a64 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java @@ -3145,18 +3145,16 @@ public final class MainFrame extends AppRibbonFrame implements ActionListener, T } } ((CardLayout) viewerCards.getLayout()).show(viewerCards, FLASH_VIEWER_CARD); - if (flashPanel instanceof FlashPlayerPanel) { - if (tempFile != null) { - tempFile.delete(); - } - try { - tempFile = File.createTempFile("temp", ".swf"); - tempFile.deleteOnExit(); - swf.saveTo(new FileOutputStream(tempFile)); - flashPanel.displaySWF(tempFile.getAbsolutePath(), backgroundColor, swf.frameRate); - } catch (IOException iex) { - Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, "Cannot create tempfile", iex); - } + if (tempFile != null) { + tempFile.delete(); + } + try { + tempFile = File.createTempFile("temp", ".swf"); + tempFile.deleteOnExit(); + swf.saveTo(new FileOutputStream(tempFile)); + flashPanel.displaySWF(tempFile.getAbsolutePath(), backgroundColor, swf.frameRate); + } catch (IOException iex) { + Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, "Cannot create tempfile", iex); } } } @@ -3557,9 +3555,7 @@ public final class MainFrame extends AppRibbonFrame implements ActionListener, T } showCard(CARDFLASHPANEL); if (flashPanel != null) { - if (flashPanel instanceof FlashPlayerPanel) { - flashPanel.displaySWF(tempFile.getAbsolutePath(), backgroundColor, frameRate); - } + flashPanel.displaySWF(tempFile.getAbsolutePath(), backgroundColor, frameRate); } } catch (IOException | com.jpexs.decompiler.flash.action.parser.ParseException ex) {