mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-15 15:23:06 +02:00
Bugfix: NPE using a cycling sensor.
This commit is contained in:
@@ -52,7 +52,7 @@ public final class SensorDataSet {
|
|||||||
|
|
||||||
public Pair<Speed, String> getSpeed() {
|
public Pair<Speed, String> getSpeed() {
|
||||||
if (cyclingDistanceSpeed != null && cyclingDistanceSpeed.hasValue() && cyclingDistanceSpeed.getValue().getSpeed() != null) {
|
if (cyclingDistanceSpeed != null && cyclingDistanceSpeed.hasValue() && cyclingDistanceSpeed.getValue().getSpeed() != null) {
|
||||||
return new Pair<>(cyclingDistanceSpeed.getValue().getSpeed(), cyclingCadence.getSensorNameOrAddress());
|
return new Pair<>(cyclingDistanceSpeed.getValue().getSpeed(), cyclingDistanceSpeed.getSensorNameOrAddress());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (runningDistanceSpeedCadence != null && runningDistanceSpeedCadence.hasValue() && runningDistanceSpeedCadence.getValue().getSpeed() != null) {
|
if (runningDistanceSpeedCadence != null && runningDistanceSpeedCadence.hasValue() && runningDistanceSpeedCadence.getValue().getSpeed() != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user