From 03cde21eb991adcdba718e71813b31bab6296da1 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Wed, 13 Mar 2019 23:45:58 +0100 Subject: [PATCH] Avoid null Location updates --- .../securesms/geolocation/LocationBackgroundService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/org/thoughtcrime/securesms/geolocation/LocationBackgroundService.java b/src/org/thoughtcrime/securesms/geolocation/LocationBackgroundService.java index ac1668205..8ae613414 100644 --- a/src/org/thoughtcrime/securesms/geolocation/LocationBackgroundService.java +++ b/src/org/thoughtcrime/securesms/geolocation/LocationBackgroundService.java @@ -111,6 +111,9 @@ public class LocationBackgroundService extends Service { @Override public void onLocationChanged(Location location) { Log.d(TAG, "onLocationChanged: " + location); + if (location == null) { + return; + } if (isBetterLocation(location, DcLocation.getInstance().getLastLocation())) { DcLocation.getInstance().updateLocation(location); }