Browse Source

HerbalismBlock could be null here.

GJ 12 years ago
parent
commit
2764368089
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java

+ 1 - 1
src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java

@@ -196,7 +196,7 @@ public class Herbalism {
             if (chance > Misc.getRandom().nextInt(activationChance)) {
                 Location location = block.getLocation();
 
-                if (dropItem != null && herbalismBlock.canDoubleDrop()) {
+                if (herbalismBlock != null && dropItem != null && herbalismBlock.canDoubleDrop()) {
                     Misc.dropItems(location, dropItem, dropAmount);
                 }
                 else if (customBlock != null){