mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 02:07:12 +00:00
Prevent crash
This commit is contained in:
parent
3570247a65
commit
c3d3cbbd10
1 changed files with 4 additions and 0 deletions
|
@ -217,6 +217,7 @@ public class FragmentCompose extends FragmentBase {
|
|||
private ViewGroup view;
|
||||
private Spinner spIdentity;
|
||||
private EditText etExtra;
|
||||
private EditText etExtra;
|
||||
private TextView tvDomain;
|
||||
private MultiAutoCompleteTextView etTo;
|
||||
private ImageButton ibToAdd;
|
||||
|
@ -3224,6 +3225,9 @@ public class FragmentCompose extends FragmentBase {
|
|||
is = context.getContentResolver().openInputStream(uri);
|
||||
os = new FileOutputStream(file);
|
||||
|
||||
if (is == null)
|
||||
throw new IOException("Content provider crashed");
|
||||
|
||||
byte[] buffer = new byte[Helper.BUFFER_SIZE];
|
||||
for (int len = is.read(buffer); len != -1; len = is.read(buffer)) {
|
||||
size += len;
|
||||
|
|
Loading…
Reference in a new issue