1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

Providing error messages when no board is selected.

This commit is contained in:
David A. Mellis
2010-06-12 18:32:32 +00:00
parent 0979ed050b
commit 9fe672fc63
3 changed files with 15 additions and 2 deletions

View File

@ -1520,7 +1520,13 @@ public class Base {
static public Map<String, String> getBoardPreferences() {
return getTarget().getBoards().get(Preferences.get("board"));
Target target = getTarget();
if (target == null) return new LinkedHashMap();
Map map = target.getBoards();
if (map == null) return new LinkedHashMap();
map = (Map) map.get(Preferences.get("board"));
if (map == null) return new LinkedHashMap();
return map;
}