From 277aa6c59e5ad34af3c93840b3b241b82a1a8327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 6 Mar 2021 16:00:58 +0100 Subject: [PATCH] Fixed: #1636 Nullpointer exception on empty editorpane --- CHANGELOG.md | 3 ++- .../jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dbb5adec..b6c2f7537 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file. - Exception when switching from nonribbon interface to ribbon - [#1396], [#1254] FLA Export - AS3 frame scripts - FLA Export - mutliple FrameLabel layers +- [#1636] Nullpointer exception on empty editorpane ## [14.1.0] - 2021-03-05 ### Added @@ -2081,6 +2082,7 @@ All notable changes to this project will be documented in this file. [#1471]: https://www.free-decompiler.com/flash/issues/1471 [#1396]: https://www.free-decompiler.com/flash/issues/1396 [#1254]: https://www.free-decompiler.com/flash/issues/1254 +[#1636]: https://www.free-decompiler.com/flash/issues/1636 [#1561]: https://www.free-decompiler.com/flash/issues/1561 [#1623]: https://www.free-decompiler.com/flash/issues/1623 [#1622]: https://www.free-decompiler.com/flash/issues/1622 @@ -2090,7 +2092,6 @@ All notable changes to this project will be documented in this file. [#1633]: https://www.free-decompiler.com/flash/issues/1633 [#1603]: https://www.free-decompiler.com/flash/issues/1603 [#1634]: https://www.free-decompiler.com/flash/issues/1634 -[#1636]: https://www.free-decompiler.com/flash/issues/1636 [#1570]: https://www.free-decompiler.com/flash/issues/1570 [#1643]: https://www.free-decompiler.com/flash/issues/1643 [#1328]: https://www.free-decompiler.com/flash/issues/1328 diff --git a/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java b/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java index 4d00a0c9b..efa5e9485 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java @@ -416,6 +416,9 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL Trait currentTrait = null; int currentMethod = -1; ABC abc = getABC(); + if (abc == null) { + return -1; + } if (tm != null) { int mi = (int) tm.getProperties().index;