Fixed NullPointer on reload / uncache

This commit is contained in:
Jindra Petřík
2023-09-23 17:50:42 +02:00
parent 9947cb0b88
commit 6733d305bb
2 changed files with 4 additions and 0 deletions

View File

@@ -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);