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();
|
||||
trackRecordingServiceConnection = null;
|
||||
viewModel = null;
|
||||
statisticsLiveData.removeObservers(getActivity());
|
||||
|
||||
if (statisticsLiveData != null) {
|
||||
statisticsLiveData.removeObservers(getActivity());
|
||||
}
|
||||
statisticsLiveData = null;
|
||||
}
|
||||
|
||||
private void updateUI() {
|
||||
|
||||
Reference in New Issue
Block a user