diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/Tag.java index 6e8c81b1a..9238a93e9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/Tag.java @@ -420,6 +420,9 @@ public abstract class Tag implements NeedsCharacters, Exportable, Serializable { public void undo() throws InterruptedException, IOException { byte[] data = getOriginalData(); + if (data == null) { //If the tag is newly created in GUI it has no original data + return; + } SWFInputStream tagDataStream = new SWFInputStream(swf, data, getDataPos(), data.length); readData(tagDataStream, getOriginalRange(), 0, false, true, false); setModified(false);