From 79e2f1ddee6c6ce97c1ebf25ecfc3804b12cd927 Mon Sep 17 00:00:00 2001 From: PaulStets Date: Thu, 1 Mar 2018 14:58:54 +0200 Subject: [PATCH] Future optimization for the subway icon --- .../mapcontextmenu/controllers/AmenityMenuController.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AmenityMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AmenityMenuController.java index bd771cf2d5..6837179d63 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AmenityMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AmenityMenuController.java @@ -193,7 +193,11 @@ public class AmenityMenuController extends MenuController { Map addTypes = amenity.getAdditionalInfo(); if (addTypes != null) { String region = addTypes.get("subway_region"); - region = region == null ? "" : "subway_" + region; + if (region == null) { + return null; + } else { + region = "subway_" + region; + } if (RenderingIcons.containsBigIcon(region)) { return RenderingIcons.getBigIcon(getMapActivity(), region); }