From 2398b55d271117d705b9b6b3b5a59dddef19a038 Mon Sep 17 00:00:00 2001 From: Zahnstocher Date: Thu, 3 Jul 2014 10:49:45 +0200 Subject: [PATCH] Fix null --- .../plus/views/controls/MapRoutePreferencesControl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java b/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java index 1003032cf5..f937f460be 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java @@ -283,7 +283,7 @@ public class MapRoutePreferencesControl extends MapControls { final LocalRoutingParameter rp = getItem(position); tv.setText(rp.getText(mapActivity)); 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 ch.setChecked(!settings.FAST_ROUTE_MODE.get()); } else { @@ -294,7 +294,7 @@ public class MapRoutePreferencesControl extends MapControls { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { //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); } else { rp.setSelected(settings, isChecked);