fix NPE in SelectedGPXFragment
This commit is contained in:
parent
9e229455ea
commit
1d5d6430ac
1 changed files with 1 additions and 1 deletions
|
@ -335,7 +335,7 @@ public class SelectedGPXFragment extends OsmAndListFragment {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
SelectedGpxFile sf = app.getSelectedGpxHelper().selectGpxFile(getGpx(), vis.isChecked(), false);
|
SelectedGpxFile sf = app.getSelectedGpxHelper().selectGpxFile(getGpx(), vis.isChecked(), false);
|
||||||
int clr = list.get(colorSpinner.getSelectedItemPosition());
|
int clr = list.get(colorSpinner.getSelectedItemPosition());
|
||||||
if(clr != 0 && sf.getModifiableGpxFile() != null) {
|
if(clr != null && clr != 0 && sf.getModifiableGpxFile() != null) {
|
||||||
sf.getModifiableGpxFile().setColor(clr);
|
sf.getModifiableGpxFile().setColor(clr);
|
||||||
sf.processPoints();
|
sf.processPoints();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue