Skip to content

Commit

Permalink
fix NPE with null leaf block icon
Browse files Browse the repository at this point in the history
  • Loading branch information
octarine-noise committed May 26, 2015
1 parent 4e6f8a7 commit 87d1710
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -54,7 +54,7 @@ public EntityFXFallingLeaves(World world, int x, int y, int z) {
if (leafInfo != null) {
particleIcon = leafInfo.particleIcons.get(rand.nextInt(1024));
calculateParticleColor(leafInfo.averageColor, block.colorMultiplier(world, x, y, z));
} else if (!BetterFoliageClient.leafTextures.erroredTextures.contains(blockIcon)){
} else if (blockIcon != null && !BetterFoliageClient.leafTextures.erroredTextures.contains(blockIcon)){
BetterFoliageClient.leafTextures.erroredTextures.add(blockIcon);
BetterFoliage.log.warn(String.format("Error creating leaf particle: unknown texture %s", blockIcon.getIconName()));
}
Expand Down

0 comments on commit 87d1710

Please sign in to comment.