diff --git a/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java b/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java index 63508a91ea..ffc0507eb2 100644 --- a/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java @@ -478,6 +478,9 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment { @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { + if (this.isDetached()) { + return; + } //fixes issue when local files not shown after switching tabs if (listAdapter.getGroupCount() == 0 && getDownloadActivity().getLocalIndexInfos().size() > 0){ for(LocalIndexInfo info : getDownloadActivity().getLocalIndexInfos()){