mirror of
https://gitlab.com/oeffi/oeffi.git
synced 2025-07-10 00:08:48 +00:00
OeffiMapView: Fix NullPointerException.
This commit is contained in:
parent
f8b7003f5e
commit
aae9361743
1 changed files with 6 additions and 3 deletions
|
@ -613,9 +613,12 @@ public class OeffiMapView extends MapView {
|
|||
// show at most 16 stations
|
||||
final List<GeoPoint> points = new LinkedList<>();
|
||||
for (final Station station : stations) {
|
||||
points.add(new GeoPoint(station.location.getLatAsDouble(), station.location.getLonAsDouble()));
|
||||
if (points.size() >= 16)
|
||||
break;
|
||||
final Location location = station.location;
|
||||
if (location.hasCoord()) {
|
||||
points.add(new GeoPoint(location.getLatAsDouble(), location.getLonAsDouble()));
|
||||
if (points.size() >= 16)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// make sure a minimum area is shown
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue