mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-29 05:20:23 +01:00
Merge pull request #143 from EXL/fix_fpicker_crash
Fix crash in FPicker on Android OS >= 7.0
This commit is contained in:
commit
c1da6335e4
@ -78,15 +78,16 @@ public class FPicker extends Activity {
|
||||
{
|
||||
File[] dirs = folder.listFiles();
|
||||
List<Item> dir = new ArrayList<Item>();
|
||||
|
||||
|
||||
while( dirs == null )
|
||||
{
|
||||
folder = new File(folder.getParent());
|
||||
if( folder == null )
|
||||
return dir;
|
||||
try {
|
||||
folder = new File(folder.getParent());
|
||||
} catch (NullPointerException e) {
|
||||
folder = new File(Environment.getExternalStorageDirectory().toString());
|
||||
}
|
||||
dirs = folder.listFiles();
|
||||
}
|
||||
|
||||
|
||||
for(File ff: dirs)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user