Fix NPE
This commit is contained in:
parent
d4fcfc7b49
commit
b4add50e78
1 changed files with 13 additions and 13 deletions
|
@ -222,6 +222,7 @@ public class SplitSegmentDialogFragment extends DialogFragment {
|
|||
}
|
||||
|
||||
public void updateContent() {
|
||||
if (getTrackActivity() != null) {
|
||||
adapter.clear();
|
||||
adapter.setNotifyOnChange(false);
|
||||
GpxDisplayItem overviewSegments = getOverviewSegment();
|
||||
|
@ -233,6 +234,7 @@ public class SplitSegmentDialogFragment extends DialogFragment {
|
|||
headerView.setTranslationY(0);
|
||||
updateHeader();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateSplit(List<GpxDisplayGroup> groups, GpxSelectionHelper.SelectedGpxFile sf) {
|
||||
new SplitTrackAsyncTask(sf, groups).execute((Void) null);
|
||||
|
@ -682,10 +684,8 @@ public class SplitSegmentDialogFragment extends DialogFragment {
|
|||
List<GpxDisplayGroup> groups = getDisplayGroups();
|
||||
mSelectedGpxFile.setDisplayGroups(groups);
|
||||
}
|
||||
if (getTrackActivity() != null) {
|
||||
updateContent();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Void doInBackground(Void... params) {
|
||||
|
|
Loading…
Reference in a new issue