1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 18:27:43 +00:00

Prevent crash

This commit is contained in:
M66B 2020-12-06 14:53:46 +01:00
parent 3570247a65
commit c3d3cbbd10

View file

@ -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;