prevents NPE when selecting empty local folder

This commit is contained in:
tobiasKaminsky 2016-07-31 12:33:35 +02:00
parent 6bf6981a41
commit d533b5f2d9

View file

@ -106,7 +106,7 @@ public class LocalFileListAdapter extends BaseAdapter implements ListAdapter {
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = inflator.inflate(R.layout.list_item, null);
}
if (mFiles != null && mFiles.length > position) {
if (mFiles != null && mFiles.length > position && mFiles[position] != null) {
File file = mFiles[position];
TextView fileName = (TextView) view.findViewById(R.id.Filename);