From 79d304495e98bf12a1ca1d371c90a4837860fbf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sun, 18 Dec 2022 00:03:01 +0100 Subject: [PATCH] Fixed Exception on closing multiple SWFs --- CHANGELOG.md | 1 + src/com/jpexs/decompiler/flash/gui/MainPanel.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6231a22ca..e7fd780a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ All notable changes to this project will be documented in this file. - Classnames in PlaceObject - [#1828] AS1/2 deobfuscation removing variable declarations - Loaded SWFs using "Open loaded during play" feature have short filenames +- Exception on closing multiple SWFs ### Changed - Quick search needs minimum of 3 characters diff --git a/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/src/com/jpexs/decompiler/flash/gui/MainPanel.java index 8f4c076a1..8c90f377e 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -1165,7 +1165,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se AbstractTagTreeModel ttm = tagTree.getFullModel(); if (ttm != null) { if (getCurrentSwf() == null) { - tagTree.setSelectionPath(ttm.getTreePath(ttm.getRoot())); + tagTree.clearSelection(); } ttm.updateSwfs(e); tagTree.expandRoot(); @@ -1185,7 +1185,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se ttm = tagListTree.getFullModel(); if (ttm != null) { if (getCurrentSwf() == null) { - tagListTree.setSelectionPath(ttm.getTreePath(ttm.getRoot())); + tagListTree.clearSelection(); } ttm.updateSwfs(e); tagListTree.expandRoot();