From f6e51bbaccb7b3d9dd19aac1e7dc1916134383fd Mon Sep 17 00:00:00 2001 From: "honfika@gmail.com" Date: Sun, 19 Jul 2015 13:40:01 +0200 Subject: [PATCH] NullPointer exception fixed when debug mode is enabled --- .../jpexs/decompiler/flash/gui/editor/LineMarkedEditorPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/jpexs/decompiler/flash/gui/editor/LineMarkedEditorPane.java b/src/com/jpexs/decompiler/flash/gui/editor/LineMarkedEditorPane.java index 62c8e05f5..2e32590b0 100644 --- a/src/com/jpexs/decompiler/flash/gui/editor/LineMarkedEditorPane.java +++ b/src/com/jpexs/decompiler/flash/gui/editor/LineMarkedEditorPane.java @@ -274,7 +274,7 @@ public class LineMarkedEditorPane extends UndoFixedEditorPane implements LinkHan public void setText(String t) { lastLine = -1; error = false; - if (Configuration.debugMode.get() && t.length() > truncateLimit) { + if (Configuration.debugMode.get() && t != null && t.length() > truncateLimit) { t = t.substring(0, truncateLimit) + "\r\n" + AppStrings.translate("editorTruncateWarning").replace("%chars%", Integer.toString(truncateLimit)); } super.setText(t);