mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-23 18:02:15 -05:00
Added a check to prevent an ArrayIndexOutOfBoundsException
Fixes issue 3683
This commit is contained in:
parent
feee0c64f7
commit
88dc36da8a
@ -197,9 +197,12 @@ public class SingleMessageView extends LinearLayout {
|
||||
// button wasn't already pressed, see if the user's preferences has us
|
||||
// showing them anyway.
|
||||
if (Utility.hasExternalImages(text) && !showPictures()) {
|
||||
Address[] from = message.getFrom();
|
||||
if ((account.getShowPictures() == Account.ShowPictures.ALWAYS) ||
|
||||
((account.getShowPictures() == Account.ShowPictures.ONLY_FROM_CONTACTS) &&
|
||||
mContacts.isInContacts(message.getFrom()[0].getAddress()))) {
|
||||
// Make sure we have at least one from address
|
||||
(from != null && from.length > 0) &&
|
||||
mContacts.isInContacts(from[0].getAddress()))) {
|
||||
setLoadPictures(true);
|
||||
} else {
|
||||
showShowPicturesSection(true);
|
||||
|
Loading…
Reference in New Issue
Block a user