Fix #1262 NullPointerException from null name in the OreDictionary

This commit is contained in:
mezz committed 2016-06-01 12:57:27 -07:00
1 parent e23a406e6f
commit d3c7d7141d
1 file changed
+7 -3
@@ -367,9 +367,13 @@ public class PluginStorage extends BlankForestryPlugin {
List<String> 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);
}
}
}
}