mirror of
https://gitlab.com/oeffi/oeffi.git
synced 2025-07-07 06:08:51 +00:00
StationsActivity: Fix NullPointerException in handleIntent().
This commit is contained in:
parent
a4fba695a4
commit
5170775169
1 changed files with 26 additions and 27 deletions
|
@ -594,7 +594,7 @@ public class StationsActivity extends OeffiMainActivity implements StationsAware
|
||||||
final Location[] locations = LocationUriParser.parseLocations(intentUri.toString());
|
final Location[] locations = LocationUriParser.parseLocations(intentUri.toString());
|
||||||
fixedLocation = locations != null && locations.length >= 1 ? locations[0] : null;
|
fixedLocation = locations != null && locations.length >= 1 ? locations[0] : null;
|
||||||
|
|
||||||
if (fixedLocation != null) {
|
if (fixedLocation != null && fixedLocation.hasCoord())
|
||||||
mapView.animateToLocation(fixedLocation.getLatAsDouble(), fixedLocation.getLonAsDouble());
|
mapView.animateToLocation(fixedLocation.getLatAsDouble(), fixedLocation.getLonAsDouble());
|
||||||
|
|
||||||
findViewById(R.id.stations_location_clear).setOnClickListener(new OnClickListener() {
|
findViewById(R.id.stations_location_clear).setOnClickListener(new OnClickListener() {
|
||||||
|
@ -631,7 +631,6 @@ public class StationsActivity extends OeffiMainActivity implements StationsAware
|
||||||
|
|
||||||
handler.post(initStationsRunnable);
|
handler.post(initStationsRunnable);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
final String query = intent.getStringExtra(SearchManager.QUERY);
|
final String query = intent.getStringExtra(SearchManager.QUERY);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue