From f0e8385e2b8c00fec7756af6fa0f2587d3672dba Mon Sep 17 00:00:00 2001 From: crschnick Date: Sun, 20 Aug 2023 01:43:47 +0000 Subject: [PATCH] Fix NPE in browser when no editor was set --- .../main/java/io/xpipe/ext/base/browser/EditFileAction.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/EditFileAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/EditFileAction.java index e68048a04..abff2fd17 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/EditFileAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/EditFileAction.java @@ -43,6 +43,7 @@ public class EditFileAction implements LeafAction { @Override public String getName(OpenFileSystemModel model, List entries) { - return "Edit with " + AppPrefs.get().externalEditor().getValue().toTranslatedString(); + var e = AppPrefs.get().externalEditor().getValue(); + return "Edit with " + (e != null ? e.toTranslatedString() : "?"); } }