Verify "flist" is not null before sort / add

This commit is contained in:
TwistedUmbrella 2015-08-10 22:24:38 -04:00
parent 8de800497e
commit 83d525d0f9
1 changed files with 6 additions and 4 deletions

View File

@ -430,12 +430,14 @@ public class FileBrowser extends Fragment {
list.add(null);
if (parent != null)
if (parent != null) {
list.add(parent);
}
Arrays.sort(flist, new DirSort());
Collections.addAll(list, flist);
if (flist != null) {
Arrays.sort(flist, new DirSort());
Collections.addAll(list, flist);
}
for (final File file : list) {
if (file != null && !file.isDirectory() && !file.getAbsolutePath().equals("/data"))