Fix frequent NPE
This commit is contained in:
parent
9cee11fefa
commit
d6791fc248
1 changed files with 1 additions and 1 deletions
|
@ -420,7 +420,7 @@ public class VoiceRouter {
|
|||
|
||||
NextDirectionInfo nextInfo = router.getNextRouteDirectionInfo(new NextDirectionInfo(), true);
|
||||
RouteSegmentResult currentSegment = router.getCurrentSegmentResult();
|
||||
if (nextInfo.directionInfo == null) {
|
||||
if (nextInfo == null || nextInfo.directionInfo == null) {
|
||||
return;
|
||||
}
|
||||
int dist = nextInfo.distanceTo;
|
||||
|
|
Loading…
Reference in a new issue