Skip to content

Commit

Permalink
Fix strange/rare NPE due to null difficultySetting
Browse files Browse the repository at this point in the history
 * Fixes #55 (probably)
  • Loading branch information
squeek502 committed Nov 4, 2014
1 parent 8453b3d commit 8e2010e
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -133,7 +133,7 @@ else if (growingAge < 0 && rndChild != 0)
if (IguanaConfig.addLowStatEffects)
{
int difficultyModifierEffects = 2;
if (IguanaConfig.difficultyScalingEffects)
if (IguanaConfig.difficultyScalingEffects && event.entityLiving.worldObj.difficultySetting != null)
{
difficultyModifierEffects = event.entityLiving.worldObj.difficultySetting.getDifficultyId();

Expand Down

0 comments on commit 8e2010e

Please sign in to comment.