Add missing exception null check to async completed callback
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user