Fixed #1904 NullpointerException when renaming invalid identifiers in AS1/2 files caused by missing charset

This commit is contained in:
Jindra Petřík
2022-12-20 08:55:15 +01:00
parent d5d730b083
commit ce4f3e2920
7 changed files with 23 additions and 8 deletions

View File

@@ -2968,7 +2968,11 @@ public final class SWF implements SWFContainerItem, Timelined, Openable {
for (ASMSource src : actionsMap.keySet()) {
actionsMap.get(src).removeNops();
src.setActions(actionsMap.get(src));
try {
src.setActions(actionsMap.get(src));
} catch (ValueTooLargeException vtle) {
Logger.getLogger(SWF.class.getName()).log(Level.WARNING, "renaming AS2 identifiers failed for an action source with error: {0}", vtle.getMessage());
}
src.setModified();
}