fix NPE: grow PathLayer point array
This commit is contained in:
parent
cf9bbec9a5
commit
4789ecb8d7
@ -99,7 +99,7 @@ public class PathLayer extends Layer {
|
|||||||
ArrayList<GeoPoint> geopoints = mPoints;
|
ArrayList<GeoPoint> geopoints = mPoints;
|
||||||
double[] points = mPreprojected;
|
double[] points = mPreprojected;
|
||||||
|
|
||||||
if (size * 2 > points.length) {
|
if (size * 2 >= points.length) {
|
||||||
points = mPreprojected = new double[size * 2];
|
points = mPreprojected = new double[size * 2];
|
||||||
mPPoints = new float[size * 2];
|
mPPoints = new float[size * 2];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user