diff --git a/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeModel.java b/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeModel.java index da54545fb..eeaa7109c 100644 --- a/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeModel.java +++ b/src/com/jpexs/decompiler/flash/gui/tagtree/TagTreeModel.java @@ -569,8 +569,15 @@ public class TagTreeModel implements TreeModel { } if (result instanceof Tag) { Tag resultTag = (Tag) result; - Map currentTagScriptCache = swfInfos.get(result.getSwf()).tagScriptCache; - TagScript tagScript = currentTagScriptCache.get(resultTag); + TagScript tagScript = null; + Map currentTagScriptCache = null; + if (swfInfos != null && result.getSwf() != null) { + TagTreeSwfInfo ttsi = swfInfos.get(result.getSwf()); + if (ttsi != null) { + currentTagScriptCache = ttsi.tagScriptCache; + tagScript = currentTagScriptCache.get(resultTag); + } + } if (tagScript == null) { List subNodes = new ArrayList<>(); if (result instanceof ASMSourceContainer) { @@ -579,7 +586,9 @@ public class TagTreeModel implements TreeModel { } } tagScript = new TagScript(result.getSwf(), resultTag, subNodes); - currentTagScriptCache.put(resultTag, tagScript); + if (currentTagScriptCache != null) { + currentTagScriptCache.put(resultTag, tagScript); + } } result = tagScript; }