mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-30 09:31:11 +01:00
Prevent crash
This commit is contained in:
@@ -627,7 +627,11 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
|
||||
} else {
|
||||
File file = EntityAttachment.getFile(context, attachment.id);
|
||||
Drawable d = Drawable.createFromPath(file.getAbsolutePath());
|
||||
d.setBounds(0, 0, d.getIntrinsicWidth(), d.getIntrinsicHeight());
|
||||
if (d == null) {
|
||||
d = context.getResources().getDrawable(R.drawable.baseline_warning_24, context.getTheme());
|
||||
d.setBounds(0, 0, px, px);
|
||||
} else
|
||||
d.setBounds(0, 0, d.getIntrinsicWidth(), d.getIntrinsicHeight());
|
||||
return d;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user