mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-07 17:43:18 +02:00
Prevent crash
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user