We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6309cc commit b7b192fCopy full SHA for b7b192f
1 file changed
mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/MapboxTelemetry.java
@@ -598,8 +598,13 @@ private void shutdownTelemetry() {
598
withShutDown = false;
599
events.removeAllElements();
600
context.stopService(new Intent(context, TelemetryService.class));
601
- locationEngine.removeLocationEngineListener(this);
602
- locationEngine.removeLocationUpdates();
+ if (locationEngine == null) {
+ Log.e(LOG_TAG, String.format(
603
+ "Shutdown error: Location Engine instance wasn't set up (initialized: %b).", initialized));
604
+ } else {
605
+ locationEngine.removeLocationEngineListener(this);
606
+ locationEngine.removeLocationUpdates();
607
+ }
608
if (timer != null) {
609
timer.cancel();
610
timer = null;
0 commit comments