From d3c7d7141d8e308cf00651622985d0ad099c3c8a Mon Sep 17 00:00:00 2001 From: mezz Date: Wed, 1 Jun 2016 12:57:27 -0700 Subject: [PATCH] Fix #1262 NullPointerException from null name in the OreDictionary --- src/main/java/forestry/storage/PluginStorage.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/forestry/storage/PluginStorage.java b/src/main/java/forestry/storage/PluginStorage.java index 3984a6324..1164f68cb 100644 --- a/src/main/java/forestry/storage/PluginStorage.java +++ b/src/main/java/forestry/storage/PluginStorage.java @@ -367,9 +367,13 @@ public class PluginStorage extends BlankForestryPlugin { List oreDictNameList = new ArrayList<>(); for (String name : OreDictionary.getOreNames()) { - for (String regex : backpackConf.getStringList()) { - if (name.matches(regex)) { - oreDictNameList.add(name); + if (name == null) { + Log.error("Found a null oreName in the ore dictionary"); + } else { + for (String regex : backpackConf.getStringList()) { + if (name.matches(regex)) { + oreDictNameList.add(name); + } } } }