From 57dfa005419085a70e0a026e15fe6a92c03020e6 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Fri, 27 Sep 2013 10:46:47 +0200 Subject: [PATCH] Fixed a NPE when an invalid repair material was entered #1484 --- .../com/gmail/nossr50/skills/repair/config/RepairConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/skills/repair/config/RepairConfig.java b/src/main/java/com/gmail/nossr50/skills/repair/config/RepairConfig.java index 8e4beb4a5..325653365 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/config/RepairConfig.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/config/RepairConfig.java @@ -134,7 +134,7 @@ public class RepairConfig extends ConfigLoader { } // Minimum Quantity - int minimumQuantity = (itemMaterial != null ? Repair.getRepairAndSalvageQuantities(new ItemStack(itemMaterial), repairMaterial, repairMetadata) : config.getInt("Repairables." + key + ".MinimumQuantity")); + int minimumQuantity = (itemMaterial != null && repairMaterial != null ? Repair.getRepairAndSalvageQuantities(new ItemStack(itemMaterial), repairMaterial, repairMetadata) : config.getInt("Repairables." + key + ".MinimumQuantity")); if (minimumQuantity <= 0) { reason.add("Minimum quantity of " + key + " must be greater than 0!");