forked from upstream-mirrors/OpenTracks
Bugfix: prevent crash when ending a recording (barometer present).
Fixes #1766.
This commit is contained in:
@@ -120,6 +120,10 @@ public final class SensorDataSet {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (value instanceof AtmosphericPressure) {
|
if (value instanceof AtmosphericPressure) {
|
||||||
|
if (this.barometer == null) {
|
||||||
|
//TODO Quick fix. This shouldn't happen, but it does. May be a race condition?
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.barometer.add((Raw<AtmosphericPressure>) data);
|
this.barometer.add((Raw<AtmosphericPressure>) data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user