Fix NPE
This commit is contained in:
parent
3f12b33e78
commit
b2ae6b0f0e
1 changed files with 1 additions and 1 deletions
|
@ -248,7 +248,7 @@ public class RouteProvider {
|
|||
}
|
||||
}
|
||||
private void introduceFirstPoint(Location start) {
|
||||
if (locations.get(0).distanceTo(start) > 200) {
|
||||
if (!locations.isEmpty() && locations.get(0).distanceTo(start) > 200) {
|
||||
// add start point
|
||||
locations.add(0, start);
|
||||
if (directions != null) {
|
||||
|
|
Loading…
Reference in a new issue