Fix null
This commit is contained in:
parent
ea3d914f1f
commit
2398b55d27
1 changed files with 2 additions and 2 deletions
|
@ -283,7 +283,7 @@ public class MapRoutePreferencesControl extends MapControls {
|
||||||
final LocalRoutingParameter rp = getItem(position);
|
final LocalRoutingParameter rp = getItem(position);
|
||||||
tv.setText(rp.getText(mapActivity));
|
tv.setText(rp.getText(mapActivity));
|
||||||
tv.setPadding((int) (5 * scaleCoefficient), 0, 0, 0);
|
tv.setPadding((int) (5 * scaleCoefficient), 0, 0, 0);
|
||||||
if (rp.routingParameter.getId().equals("short_way")){
|
if (rp.routingParameter != null && rp.routingParameter.getId().equals("short_way")){
|
||||||
//if short route settings - it should be inverse of fast_route_mode
|
//if short route settings - it should be inverse of fast_route_mode
|
||||||
ch.setChecked(!settings.FAST_ROUTE_MODE.get());
|
ch.setChecked(!settings.FAST_ROUTE_MODE.get());
|
||||||
} else {
|
} else {
|
||||||
|
@ -294,7 +294,7 @@ public class MapRoutePreferencesControl extends MapControls {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
//if short way that it should set valut to fast mode opposite of current
|
//if short way that it should set valut to fast mode opposite of current
|
||||||
if (rp.routingParameter.getId().equals("short_way")){
|
if (rp.routingParameter != null && rp.routingParameter.getId().equals("short_way")){
|
||||||
settings.FAST_ROUTE_MODE.set(!isChecked);
|
settings.FAST_ROUTE_MODE.set(!isChecked);
|
||||||
} else {
|
} else {
|
||||||
rp.setSelected(settings, isChecked);
|
rp.setSelected(settings, isChecked);
|
||||||
|
|
Loading…
Reference in a new issue