diff --git a/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java index ac87ee734e..d016ded461 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/SelectedGPXFragment.java @@ -335,7 +335,7 @@ public class SelectedGPXFragment extends OsmAndListFragment { public void onClick(DialogInterface dialog, int which) { SelectedGpxFile sf = app.getSelectedGpxHelper().selectGpxFile(getGpx(), vis.isChecked(), false); 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.processPoints(); }