From 9c0c5fc98dc17a118cd3d53cc9c19e68fe24ef98 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Fri, 19 Sep 2014 08:37:59 +0200 Subject: [PATCH] Fix NPE --- .../src/net/osmand/plus/download/DownloadIndexesThread.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java b/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java index e00bc8b0ec..1d4d053f0e 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java @@ -391,7 +391,9 @@ public class DownloadIndexesThread { uiFragment.getDownloadActivity().getEntriesToDownload().put(basemap, downloadEntry); AccessibleToast.makeText(uiFragment.getDownloadActivity(), R.string.basemap_was_selected_to_download, Toast.LENGTH_LONG).show(); - uiFragment.findViewById(R.id.DownloadButton).setVisibility(View.VISIBLE); + if(uiFragment.findViewById(R.id.DownloadButton) != null) { + uiFragment.findViewById(R.id.DownloadButton).setVisibility(View.VISIBLE); + } } } if (indexFiles.isIncreasedMapVersion()) {