Skip to content

Commit

Permalink
Check if locationManager is validbefore removing updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasMizera committed Sep 25, 2023
1 parent 97b09b0 commit f85ca39
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ public IBinder onBind( Intent intent ) {

@Override
public void onDestroy() {
locationManager.removeUpdates(this);

if (locationManager != null) {
locationManager.removeUpdates(this);
}

// Close the FileOutputStream when the service is destroyed
try {
Expand Down

1 comment on commit f85ca39

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS - version 23.09.458311 just submitted!

Please sign in to comment.