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