From 6733d305bb8dae93c473ab09d9cf39f816e783b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 23 Sep 2023 17:50:42 +0200 Subject: [PATCH] Fixed NullPointer on reload / uncache --- CHANGELOG.md | 1 + libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8957b6d6..c5b24b25b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ All notable changes to this project will be documented in this file. - [#2077] AS3 try..catch parts outside block - AS3 try..catch inside loop unneccessary continue - [#2077] AS3 colliding types in current package with trait names +- NullPointer on reload / uncache ### Changed - [#2070] String values inside SWF to XML export are backslash escaped diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java index e4db1e0d2..382ef55d5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java @@ -3253,6 +3253,9 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { public static void uncache(ScriptPack pack) { if (pack != null) { Openable openable = pack.getOpenable(); + if (openable == null) { + return; + } SWF swf = (openable instanceof SWF) ? (SWF) openable : ((ABC) openable).getSwf(); if (swf != null) { swf.as3Cache.remove(pack);