diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportRouteController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportRouteController.java index 17ec527f4f..a9f63e70a1 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportRouteController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportRouteController.java @@ -36,7 +36,9 @@ public class TransportRouteController extends MenuController { @Override public int getLeftIconId() { - return this.transportStop.type.getTopResourceId(); + return this.transportStop.type == null ? + R.drawable.mx_public_transport : + this.transportStop.type.getTopResourceId(); } @Override @@ -76,7 +78,8 @@ public class TransportRouteController extends MenuController { boolean useEnglishNames = getMapActivity().getMyApplication().getSettings().usingEnglishNames(); for (TransportStop stop : stops) { addPlainMenuItem( - stop == transportStop.stop ? R.drawable.ic_action_marker_dark : transportStop.type.getResourceId(), + stop == transportStop.stop ? R.drawable.ic_action_marker_dark : + (transportStop.type == null ? R.drawable.mx_route_bus_ref : transportStop.type.getResourceId()), useEnglishNames ? stop.getEnName(true) : stop.getName(), false, false, null); } } diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportStopController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportStopController.java index 28035a9e8f..f774bfcc74 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportStopController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportStopController.java @@ -154,6 +154,7 @@ public class TransportStopController extends MenuController { if (topType == null && type != null && type.isTopType()) { topType = type; } + r.type = type; r.desc = rs.getRef() + " " + (useEnglishNames ? rs.getEnName(true) : rs.getName()); r.route = rs; r.stop = transportStop;