Hotfix to NPE in UpdatesIndexFragment

This commit is contained in:
Denis 2014-11-10 11:19:13 +02:00
parent ef302a0059
commit 696b817863

View file

@ -42,8 +42,7 @@ public class UpdatesIndexFragment extends SherlockListFragment {
updateColor = getResources().getColor(R.color.color_update); updateColor = getResources().getColor(R.color.color_update);
osmandRegions = getMyApplication().getResourceManager().getOsmandRegions(); osmandRegions = getMyApplication().getResourceManager().getOsmandRegions();
List<IndexItem> indexItems = new ArrayList<IndexItem>(); List<IndexItem> indexItems = new ArrayList<IndexItem>();
if (DownloadActivity.downloadListIndexThread != null && if (DownloadActivity.downloadListIndexThread != null) {
DownloadActivity.downloadListIndexThread.getItemsToUpdate() != null) {
indexItems = DownloadActivity.downloadListIndexThread.getItemsToUpdate(); indexItems = DownloadActivity.downloadListIndexThread.getItemsToUpdate();
} }
listAdapter = new UpdateIndexAdapter(getDownloadActivity(), R.layout.download_index_list_item, indexItems); listAdapter = new UpdateIndexAdapter(getDownloadActivity(), R.layout.download_index_list_item, indexItems);