forked from upstream-mirrors/OpenTracks
Merge with head.
This commit is contained in:
@@ -96,14 +96,16 @@ public class ChartActivity extends Activity implements TrackDataListener {
|
|||||||
private final Runnable updateChart = new Runnable() {
|
private final Runnable updateChart = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (isFinishing()) {
|
// Get a local reference in case it's set to null concurrently with this.
|
||||||
|
TrackDataHub localDataHub = dataHub;
|
||||||
|
if (localDataHub == null || isFinishing()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
busyPane.setVisibility(View.GONE);
|
busyPane.setVisibility(View.GONE);
|
||||||
zoomControls.setIsZoomInEnabled(chartView.canZoomIn());
|
zoomControls.setIsZoomInEnabled(chartView.canZoomIn());
|
||||||
zoomControls.setIsZoomOutEnabled(chartView.canZoomOut());
|
zoomControls.setIsZoomOutEnabled(chartView.canZoomOut());
|
||||||
chartView.setShowPointer(dataHub.isRecordingSelected());
|
chartView.setShowPointer(localDataHub.isRecordingSelected());
|
||||||
chartView.invalidate();
|
chartView.invalidate();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user