Prevent crash

This commit is contained in:
M66B 2019-05-28 19:14:04 +02:00
parent 95b709e757
commit 55c65eca7f
1 changed files with 2 additions and 0 deletions

View File

@ -1673,6 +1673,8 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
if (TextUtils.isEmpty(name))
name = Long.toString(attachment.id);
DocumentFile document = tree.createFile(attachment.type, name);
if (document == null)
throw new FileNotFoundException(name);
ParcelFileDescriptor pfd = null;
OutputStream os = null;