From eb5606256031ed6f1c2924bf2e174a8d358a011a Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Sun, 17 Jan 2021 15:16:17 +0200 Subject: [PATCH] Fix possible npe --- OsmAnd/src/net/osmand/plus/track/OptionsCard.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/track/OptionsCard.java b/OsmAnd/src/net/osmand/plus/track/OptionsCard.java index 1ed533922c..e042a6ab6b 100644 --- a/OsmAnd/src/net/osmand/plus/track/OptionsCard.java +++ b/OsmAnd/src/net/osmand/plus/track/OptionsCard.java @@ -82,7 +82,10 @@ public class OptionsCard extends BaseCard { items.add(createShareItem()); if (fileAvailable) { - items.add(createUploadOsmItem()); + BaseBottomSheetItem uploadOsmItem = createUploadOsmItem(); + if (uploadOsmItem != null) { + items.add(uploadOsmItem); + } items.add(createDividerItem()); items.add(createEditItem()); items.add(createRenameItem());