1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-03 09:49:19 +02:00

fixed NPE in third-party code

This commit is contained in:
Nikolay Pultsin 2015-04-28 17:02:20 +01:00
parent a9e29adb6a
commit 7be10c91db

View file

@ -1497,10 +1497,13 @@ public class FileChooserActivity extends Activity {
}
break;
case DirectoriesOnly:
if(((File)getLocation()).canWrite()){
{
final File file = (File)getLocation();
if (file != null && file.canWrite()) {
returnPath = getLocation().getAbsolutePath();
}
break;
}
case FilesAndDirectories:
if(files == null || files.isEmpty()){
returnPath = getLocation().getAbsolutePath();