From 3b3e27cdc9e7e5471d0f6a506fa50fa58184830e Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Thu, 6 Nov 2014 23:39:27 +0100 Subject: [PATCH] Fix NPE --- OsmAnd/src/net/osmand/plus/download/DownloadIndexAdapter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadIndexAdapter.java b/OsmAnd/src/net/osmand/plus/download/DownloadIndexAdapter.java index df5042b833..388ecaa291 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadIndexAdapter.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadIndexAdapter.java @@ -173,9 +173,9 @@ public class DownloadIndexAdapter extends OsmandBaseExpandableListAdapter implem if (items != null && !items.isEmpty()) { list.addAll(IndexItemCategory.categorizeIndexItems(app, items)); } else if(DownloadIndexAdapter.this.indexFiles.isEmpty()){ - list.add(new IndexItemCategory(downloadFragment.getResources().getString(R.string.no_index_file_to_download), 1)); + list.add(new IndexItemCategory(app.getString(R.string.no_index_file_to_download), 1)); } else { - list.add(new IndexItemCategory(downloadFragment.getResources().getString(R.string.select_index_file_to_download), 1)); + list.add(new IndexItemCategory(app.getString(R.string.select_index_file_to_download), 1)); } } notifyDataSetChanged();