Fix possible NPE in searching code.

This commit is contained in:
Christian 2013-09-02 15:44:27 -04:00
parent 7246914605
commit 5c334d7627
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@
+ if (this.attacker.getNavigator().getPath() != null)
+ {
+ PathPoint finalPathPoint = this.attacker.getNavigator().getPath().getFinalPathPoint();
+ if (entitylivingbase.getDistanceSq(finalPathPoint.xCoord, finalPathPoint.yCoord, finalPathPoint.zCoord) < 1)
+ if (finalPathPoint != null && entitylivingbase.getDistanceSq(finalPathPoint.xCoord, finalPathPoint.yCoord, finalPathPoint.zCoord) < 1)
+ {
+ failedPathFindingPenalty = 0;
+ }