Verify "flist" is not null before sort / add
This commit is contained in:
parent
8de800497e
commit
83d525d0f9
|
@ -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"))
|
||||
|
|
Loading…
Reference in New Issue