diff --git a/app/src/main/java/info/zamojski/soft/towercollector/CollectorService.java b/app/src/main/java/info/zamojski/soft/towercollector/CollectorService.java index 531ed031..db045cfa 100644 --- a/app/src/main/java/info/zamojski/soft/towercollector/CollectorService.java +++ b/app/src/main/java/info/zamojski/soft/towercollector/CollectorService.java @@ -225,7 +225,9 @@ public void onDestroy() { periodicalPhoneStateListener.cancel(); } measurementParser.stop(); - externalIntentBroadcaster.stop(); + if (externalIntentBroadcaster != null) { + externalIntentBroadcaster.stop(); + } EventBus.getDefault().postSticky(new GpsStatusChangedEvent()); EventBus.getDefault().unregister(this); if (stopRequestBroadcastReceiver != null)