Fixed AS3 method display in GUI when method name is null

This commit is contained in:
Jindra Petřík
2021-02-08 20:15:19 +01:00
parent 914a2bb701
commit 99ef113dab
2 changed files with 5 additions and 1 deletions
@@ -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);
}
});