From 4fc7f7327021fc172c28389ba1230c9acb05ed00 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 23 May 2012 15:05:19 +0200 Subject: [PATCH] Fixed error message if user didn't select any board --- app/src/processing/app/debug/Compiler.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/src/processing/app/debug/Compiler.java b/app/src/processing/app/debug/Compiler.java index 1d6dfad87..3d88b9029 100644 --- a/app/src/processing/app/debug/Compiler.java +++ b/app/src/processing/app/debug/Compiler.java @@ -117,6 +117,14 @@ public class Compiler implements MessageConsumer { private PreferencesMap createBuildPreferences(String _buildPath, String _primaryClassName) throws RunnerException { + + if (Base.getBoardPreferences() == null) { + RunnerException re = new RunnerException( + _("No board selected; please choose a board from the Tools > Board menu.")); + re.hideStackTrace(); + throw re; + } + TargetPlatform targetPlatform = Base.getTargetPlatform(); // Merge all the global preference configuration in order of priority @@ -137,12 +145,6 @@ public class Compiler implements MessageConsumer { // Core folder String core = p.get("build.core"); - if (core == null) { - RunnerException re = new RunnerException( - _("No board selected; please choose a board from the Tools > Board menu.")); - re.hideStackTrace(); - throw re; - } TargetPlatform tp; if (!core.contains(":")) { tp = targetPlatform;