mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Added null check for onLocationChanged()
This commit is contained in:
parent
8a80ea080f
commit
04d441516d
1 changed files with 3 additions and 1 deletions
|
|
@ -46,7 +46,9 @@ public class GPSExtractor {
|
|||
|
||||
locationManager.requestLocationUpdates(provider, 400, 1, myLocationListener);
|
||||
Location location = locationManager.getLastKnownLocation(provider);
|
||||
myLocationListener.onLocationChanged(location);
|
||||
if (location != null) {
|
||||
myLocationListener.onLocationChanged(location);
|
||||
}
|
||||
}
|
||||
|
||||
protected void unregisterLocationManager() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue