Merge pull request #59 from misaochan/null-location-fix

Added null check for onLocationChanged()
This commit is contained in:
Nicolas Raoul 2016-02-16 11:23:24 +09:00
commit 1678c20350

View file

@ -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() {