summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/position/android/jar/src/org/qtproject/qt5/android/positioning/QtPositioning.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/position/android/jar/src/org/qtproject/qt5/android/positioning/QtPositioning.java b/src/plugins/position/android/jar/src/org/qtproject/qt5/android/positioning/QtPositioning.java
index edc39bd7..1ea0c071 100644
--- a/src/plugins/position/android/jar/src/org/qtproject/qt5/android/positioning/QtPositioning.java
+++ b/src/plugins/position/android/jar/src/org/qtproject/qt5/android/positioning/QtPositioning.java
@@ -229,8 +229,11 @@ public class QtPositioning implements LocationListener
static private void removeActiveListener(int androidClassKey)
{
QtPositioning listener = runningListeners.remove(androidClassKey);
- locationManager.removeUpdates(listener);
- listener.setActiveLooper(false);
+
+ if (listener != null) {
+ locationManager.removeUpdates(listener);
+ listener.setActiveLooper(false);
+ }
}