mirror of https://github.com/cabaletta/baritone
Add missing exception null check to async completed callback
This commit is contained in:
parent
4776fa1876
commit
47dc0f9b94
|
@ -177,10 +177,12 @@ public final class ElytraBehavior extends Behavior implements IElytraBehavior, H
|
|||
})
|
||||
.whenComplete((result, ex) -> {
|
||||
this.recalculating = false;
|
||||
if (ex instanceof PathCalculationException) {
|
||||
logDirect("Failed to compute next segment");
|
||||
} else {
|
||||
logUnhandledException(ex);
|
||||
if (ex != null) {
|
||||
if (ex instanceof PathCalculationException) {
|
||||
logDirect("Failed to compute next segment");
|
||||
} else {
|
||||
logUnhandledException(ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue