From bb695deaedcc8e9cbac070d751b359462ba71c79 Mon Sep 17 00:00:00 2001 From: Denis Date: Mon, 10 Nov 2014 11:29:44 +0200 Subject: [PATCH] Fixed NPE in localIndexFragment in onPostExecute --- .../src/net/osmand/plus/download/LocalIndexesFragment.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java b/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java index eecbb89880..2b830af740 100644 --- a/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java @@ -268,9 +268,10 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment { protected void onPostExecute(List result) { this.result = result; listAdapter.sortData(); - - getDownloadActivity().setSupportProgressBarIndeterminateVisibility(false); - getDownloadActivity().setLocalIndexInfos(result); + if (getDownloadActivity() != null){ + getDownloadActivity().setSupportProgressBarIndeterminateVisibility(false); + getDownloadActivity().setLocalIndexInfos(result); + } } public List getResult() {