diff --git a/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java b/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java index e6c7ab9853..d724e0f9ce 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java +++ b/OsmAnd/src/net/osmand/plus/helpers/AvoidSpecificRoads.java @@ -231,10 +231,8 @@ public class AvoidSpecificRoads { ll.setLongitude(loc.getLongitude()); ApplicationMode defaultAppMode = app.getRoutingHelper().getAppMode(); - final ApplicationMode appMode = ApplicationMode.valueOfStringKey(appModeKey, defaultAppMode); - if (appMode == null) { - return; - } + final ApplicationMode appMode = appModeKey != null ? ApplicationMode.valueOfStringKey(appModeKey, defaultAppMode) : defaultAppMode; + List roads = app.getRoutingHelper().getRoute().getOriginalRoute(); if (mapActivity != null && roads != null) { RotatedTileBox tb = mapActivity.getMapView().getCurrentRotatedTileBox().copy();