Fix NPE
This commit is contained in:
parent
48c8e28ff8
commit
7e227a51da
1 changed files with 3 additions and 0 deletions
|
@ -237,6 +237,9 @@ public class OsmAndLocationProvider implements SensorEventListener {
|
|||
// try to always ask for network provide : it is faster way to find location
|
||||
|
||||
List<String> providers = service.getProviders(true);
|
||||
if(providers == null) {
|
||||
return;
|
||||
}
|
||||
for (String provider : providers) {
|
||||
if (provider == null || provider.equals(LocationManager.GPS_PROVIDER)) {
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue