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));
|
||||
int start = Math.min(startPointIndex, endPointIndex);
|
||||
int end = Math.max(startPointIndex, endPointIndex);
|
||||
bundle.putArray("pointTypes", convertTypes(Arrays.copyOfRange(object.pointTypes, start,
|
||||
Math.min(end + 1, object.pointTypes.length)), rules));
|
||||
bundle.putArray("names", convertNameIds(object.nameIds, rules));
|
||||
if (object.hasPointTypes()) {
|
||||
bundle.putArray("pointTypes", convertTypes(
|
||||
Arrays.copyOfRange(object.pointTypes, start, Math.min(end + 1, object.pointTypes.length)), rules));
|
||||
}
|
||||
if (object.hasPointNames()) {
|
||||
bundle.putArray("names", convertNameIds(object.nameIds, rules));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue