diff options
author | Paul Westbrook <pwestbro@google.com> | 2014-08-15 12:23:01 -0700 |
---|---|---|
committer | Paul Westbrook <pwestbro@google.com> | 2014-08-15 12:23:01 -0700 |
commit | 1353da4b3075af7d5bb8f6bcd0dcb5bb3f8afdab (patch) | |
tree | efa23fe7bc939adbd0e55d424450a773b24b8987 /src | |
parent | d0a35bd5785dca8981ea24b1ee1d40774568f031 (diff) | |
download | android_packages_apps_UnifiedEmail-1353da4b3075af7d5bb8f6bcd0dcb5bb3f8afdab.tar.gz android_packages_apps_UnifiedEmail-1353da4b3075af7d5bb8f6bcd0dcb5bb3f8afdab.tar.bz2 android_packages_apps_UnifiedEmail-1353da4b3075af7d5bb8f6bcd0dcb5bb3f8afdab.zip |
Prevent NPE with no from address
In Gmail if you don't use a custom from, the from address is not set.
We shouldn't crash when this is the case
Bug: 17059793
Change-Id: Id7b7d9e036c469efe7de7d1f09612e97d1086e87
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/mail/ui/ConversationViewFragment.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/mail/ui/ConversationViewFragment.java b/src/com/android/mail/ui/ConversationViewFragment.java index b058a0261..b2661e0e0 100644 --- a/src/com/android/mail/ui/ConversationViewFragment.java +++ b/src/com/android/mail/ui/ConversationViewFragment.java @@ -1560,7 +1560,7 @@ public class ConversationViewFragment extends AbstractConversationViewFragment i // distinguish ours from theirs // new messages from the account owner should not trigger a // notification - if (mAccount.ownsFromAddress(from.getAddress())) { + if (from == null || mAccount.ownsFromAddress(from.getAddress())) { LogUtils.i(LOG_TAG, "found message from self: %s", m.uri); info.countFromSelf++; continue; |