From 99ef113dab1d4cacdf7a288bf6349d5810682e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sun, 7 Feb 2021 17:46:11 +0100 Subject: [PATCH] Fixed AS3 method display in GUI when method name is null --- CHANGELOG.md | 1 + src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db5ce8b1c..6508d3b91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ All notable changes to this project will be documented in this file. - #735 AS3 - index out of bounds in deobfuscator - AS3 deobfuscator on &&, || operators - Merged continues in try..catch +- AS3 method display in GUI when method name is null ### Changed - AS3 test methods separated to classes diff --git a/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java b/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java index 9299fff4c..e6a043e43 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java @@ -16,6 +16,7 @@ */ package com.jpexs.decompiler.flash.gui.abc; +import com.jpexs.decompiler.flash.abc.types.Multiname; import com.jpexs.decompiler.flash.abc.types.traits.Trait; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.gui.AppStrings; @@ -284,7 +285,9 @@ public class DetailPanel extends JPanel implements TagEditorPanel { if (trait == null) { traitNameLabel.setText("-"); } else if (abcPanel != null) { - traitNameLabel.setText(trait.getName(abcPanel.abc).getName(abcPanel.abc.constants, null, false, true)); + Multiname traitName = trait.getName(abcPanel.abc); + String traitNameStr = traitName == null ? "" : traitName.getName(abcPanel.abc.constants, null, false, true); + traitNameLabel.setText(traitNameStr); } });