From 70d3ef56d60cb91aeac80151f6ddc34f539fa4f3 Mon Sep 17 00:00:00 2001 From: Bruno Medeiros Date: Thu, 25 Feb 2016 17:52:25 +0000 Subject: [PATCH] fix NPE --- .../googlecode/goclipse/ui/editor/actions/GoFmtOperation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin_ide.ui/src/com/googlecode/goclipse/ui/editor/actions/GoFmtOperation.java b/plugin_ide.ui/src/com/googlecode/goclipse/ui/editor/actions/GoFmtOperation.java index a4ad4b0d5..ea14c73be 100644 --- a/plugin_ide.ui/src/com/googlecode/goclipse/ui/editor/actions/GoFmtOperation.java +++ b/plugin_ide.ui/src/com/googlecode/goclipse/ui/editor/actions/GoFmtOperation.java @@ -42,7 +42,7 @@ protected ProcessBuilder prepareProcessBuilder(Path goSDKPath, GoEnvironment goE } protected Path getGofmtLocation(GoEnvironment goEnv) throws CommonException { - if(GoToolPreferences.GOFMT_Path.getPreference().get().isEmpty()) { + if(GoToolPreferences.GOFMT_Path.getPreference().get() == null) { return getGofmtLocationFromGoRoot(goEnv.getGoRoot_Location()).toPath(); } return GoToolPreferences.GOFMT_Path.getDerivedValue(project);