Skip to content

Commit

Permalink
Fixed nullptr crash
Browse files Browse the repository at this point in the history
  • Loading branch information
onixiya1337 committed Dec 11, 2023
1 parent e1ce2c8 commit 64661d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/baritone/pathing/path/PathExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ public boolean onTick() {
}
Tuple<Double, BlockPos> status = closestPathPos(path);

boolean isInJumpBoost = ctx.player().getActivePotionEffect(Potion.jump).getAmplifier() > 0 && !ctx.player().onGround;
boolean isInJumpBoost = ctx.player().getActivePotionEffects() != null
&& ctx.player().getActivePotionEffect(Potion.jump) != null
&& ctx.player().getActivePotionEffect(Potion.jump).getAmplifier() > 0 && !ctx.player().onGround;

if (!isInJumpBoost && possiblyOffPath(status, BaritoneAPI.getSettings().maxDistFromPath.value)) {
ticksAway++;
Expand Down

0 comments on commit 64661d9

Please sign in to comment.