From cbf65291e37ffe3647afd4e33ab01fa1aeb77929 Mon Sep 17 00:00:00 2001 From: Alex Sytnyk Date: Mon, 6 Aug 2018 15:57:50 +0300 Subject: [PATCH] Fix possible NPE --- OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java index 89c884541f..d3207eb7c9 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuBuilder.java @@ -436,7 +436,9 @@ public class MenuBuilder { if (cardList.size() == 0) { cards.add(new NoImagesCard(mapActivity)); } - onlinePhotoCardsRow.setCards(cards); + if (onlinePhotoCardsRow != null) { + onlinePhotoCardsRow.setCards(cards); + } onlinePhotoCards = cards; } }