2
0
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:
Alibek Omarov 2017-06-23 08:31:06 +04:00 committed by GitHub
commit c1da6335e4

View File

@ -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)
{