From 34ec42fc89cf74458e511f77cb02d57e0f7bd496 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Wed, 25 Oct 2023 03:40:08 +0200 Subject: [PATCH] Fixed plyer bug --- sbapp/plyer/platforms/android/gps.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbapp/plyer/platforms/android/gps.py b/sbapp/plyer/platforms/android/gps.py index 0d12cfd..b173876 100644 --- a/sbapp/plyer/platforms/android/gps.py +++ b/sbapp/plyer/platforms/android/gps.py @@ -81,7 +81,8 @@ class AndroidGPS(GPS): Looper.getMainLooper()) def _stop(self): - self._location_manager.removeUpdates(self._location_listener) + if hasattr(self, "_location_manager") and self._location_manager != None: + self._location_manager.removeUpdates(self._location_listener) def instance():