From b034db4f39b6442847645e8b5389493523450662 Mon Sep 17 00:00:00 2001 From: nazar-kutz Date: Mon, 22 Mar 2021 14:40:49 +0200 Subject: [PATCH] After code review fixes 2 --- .../net/osmand/plus/routing/cards/RouteLineColorCard.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/cards/RouteLineColorCard.java b/OsmAnd/src/net/osmand/plus/routing/cards/RouteLineColorCard.java index 88e91c3b2a..19e0162e86 100644 --- a/OsmAnd/src/net/osmand/plus/routing/cards/RouteLineColorCard.java +++ b/OsmAnd/src/net/osmand/plus/routing/cards/RouteLineColorCard.java @@ -203,9 +203,8 @@ public class RouteLineColorCard extends BaseCard implements CardListener, ColorP private void updateColorName() { if (selectedMode == ColorMode.DEFAULT) { tvColorName.setText(app.getString(R.string.map_widget_renderer)); - } else { - int selectedColor = routeLineDrawInfo.getColor(); - int colorNameId = ColorDialogs.getColorName(selectedColor); + } else if (routeLineDrawInfo.getColor() != null) { + int colorNameId = ColorDialogs.getColorName(routeLineDrawInfo.getColor()); tvColorName.setText(app.getString(colorNameId)); } }