diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ButtonTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ButtonTag.java index c7f80836f..ba787dd3c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ButtonTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ButtonTag.java @@ -102,14 +102,18 @@ public abstract class ButtonTag extends CharacterTag implements DrawableTag, Tim } public DefineButtonSoundTag getSounds() { - for (CharacterIdTag t : swf.getCharacterIdTags(getCharacterId())) { - if (t instanceof DefineButtonSoundTag) { - DefineButtonSoundTag st = (DefineButtonSoundTag) t; - if (st.buttonId == getCharacterId()) { - return st; + List characterIdTags = swf.getCharacterIdTags(getCharacterId()); + if (characterIdTags != null) { + for (CharacterIdTag t : characterIdTags) { + if (t instanceof DefineButtonSoundTag) { + DefineButtonSoundTag st = (DefineButtonSoundTag) t; + if (st.buttonId == getCharacterId()) { + return st; + } } } } + return null; } diff --git a/src/com/jpexs/decompiler/flash/gui/FolderPreviewPanel.java b/src/com/jpexs/decompiler/flash/gui/FolderPreviewPanel.java index 3a602a19b..e5c02672f 100644 --- a/src/com/jpexs/decompiler/flash/gui/FolderPreviewPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/FolderPreviewPanel.java @@ -183,7 +183,7 @@ public class FolderPreviewPanel extends JPanel { int cols = width / CELL_WIDTH; int rows = (int) Math.ceil(items.size() / (float) cols); int height = rows * CELL_HEIGHT; - return (new Dimension(width, height)); + return new Dimension(width, height); } @Override