Skip to content

Crash selecting non-GPS #1302

@gerhardol

Description

@gerhardol

Excwption switching to Gym etc
The following seem to fix that, have not investigated further

diff --git a/app/src/main/org/runnerup/tracker/component/TrackerGPS.java b/app/src/main/org/runnerup/tracker/component/TrackerGPS.java
index 870b7f55..1b9a9581 100644
--- a/app/src/main/org/runnerup/tracker/component/TrackerGPS.java
+++ b/app/src/main/org/runnerup/tracker/component/TrackerGPS.java
@@ -262,8 +262,10 @@ public class TrackerGPS extends DefaultTrackerComponent implements TickListener
 
     Callback tmp = mConnectCallback;
     mConnectCallback = null;
-    mGpsStatus.stop(this);
-    // note: Don't reset mGpsStatus, it's used for isConnected()
+    if (mGpsStatus != null) {
+      mGpsStatus.stop(this);
+      // note: Don't reset mGpsStatus, it's used for isConnected()
+    }
 
     tmp.run(this, ResultCode.RESULT_OK);
   }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions