mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 01:39:18 +02:00
fixed NPE in third-party code
This commit is contained in:
parent
a9e29adb6a
commit
7be10c91db
1 changed files with 4 additions and 1 deletions
|
@ -1497,10 +1497,13 @@ public class FileChooserActivity extends Activity {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DirectoriesOnly:
|
case DirectoriesOnly:
|
||||||
if(((File)getLocation()).canWrite()){
|
{
|
||||||
|
final File file = (File)getLocation();
|
||||||
|
if (file != null && file.canWrite()) {
|
||||||
returnPath = getLocation().getAbsolutePath();
|
returnPath = getLocation().getAbsolutePath();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case FilesAndDirectories:
|
case FilesAndDirectories:
|
||||||
if(files == null || files.isEmpty()){
|
if(files == null || files.isEmpty()){
|
||||||
returnPath = getLocation().getAbsolutePath();
|
returnPath = getLocation().getAbsolutePath();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue