From ff116a08db1a175cc6e1a6a27107bedadc2c4c95 Mon Sep 17 00:00:00 2001 From: Chumva Date: Sat, 17 Mar 2018 13:32:09 +0200 Subject: [PATCH] added check for descriptionTv --- .../base/bottomsheetmenu/BottomSheetItemWithDescription.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithDescription.java b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithDescription.java index 0f10e34816..f6fd0faacd 100644 --- a/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithDescription.java +++ b/OsmAnd/src/net/osmand/plus/base/bottomsheetmenu/BottomSheetItemWithDescription.java @@ -48,10 +48,12 @@ public class BottomSheetItemWithDescription extends SimpleBottomSheetItem { public void inflate(OsmandApplication app, ViewGroup container, boolean nightMode) { super.inflate(app, container, nightMode); descriptionTv = (TextView) view.findViewById(R.id.description); + if (descriptionTv != null) { descriptionTv.setText(description); if (descriptionColorId != INVALID_ID) { descriptionTv.setTextColor(ContextCompat.getColor(app, descriptionColorId)); } + } } public static class Builder extends SimpleBottomSheetItem.Builder {