Prevent crash

pull/190/head
M66B 4 years ago
parent 3570247a65
commit c3d3cbbd10

@ -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…
Cancel
Save