Fix npe
This commit is contained in:
parent
f9fe588c10
commit
c7bbb80213
1 changed files with 7 additions and 3 deletions
|
@ -201,9 +201,13 @@ public class RouteSegmentResult implements StringExternalizable<RouteDataBundle>
|
||||||
bundle.putArray("types", convertTypes(object.types, rules));
|
bundle.putArray("types", convertTypes(object.types, rules));
|
||||||
int start = Math.min(startPointIndex, endPointIndex);
|
int start = Math.min(startPointIndex, endPointIndex);
|
||||||
int end = Math.max(startPointIndex, endPointIndex);
|
int end = Math.max(startPointIndex, endPointIndex);
|
||||||
bundle.putArray("pointTypes", convertTypes(Arrays.copyOfRange(object.pointTypes, start,
|
if (object.hasPointTypes()) {
|
||||||
Math.min(end + 1, object.pointTypes.length)), rules));
|
bundle.putArray("pointTypes", convertTypes(
|
||||||
bundle.putArray("names", convertNameIds(object.nameIds, rules));
|
Arrays.copyOfRange(object.pointTypes, start, Math.min(end + 1, object.pointTypes.length)), rules));
|
||||||
|
}
|
||||||
|
if (object.hasPointNames()) {
|
||||||
|
bundle.putArray("names", convertNameIds(object.nameIds, rules));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue