forked from upstream-mirrors/OpenTracks
Bugfix: prevent NPE in onDestroy.
This commit is contained in:
@@ -160,7 +160,11 @@ public class StatisticsRecordingFragment extends Fragment {
|
|||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
trackRecordingServiceConnection = null;
|
trackRecordingServiceConnection = null;
|
||||||
viewModel = null;
|
viewModel = null;
|
||||||
statisticsLiveData.removeObservers(getActivity());
|
|
||||||
|
if (statisticsLiveData != null) {
|
||||||
|
statisticsLiveData.removeObservers(getActivity());
|
||||||
|
}
|
||||||
|
statisticsLiveData = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateUI() {
|
private void updateUI() {
|
||||||
|
|||||||
Reference in New Issue
Block a user