From 353b75b04be276895b6d109ca5c1a5be8b68ab4b Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Tue, 21 Sep 2010 17:56:59 -0700 Subject: [PATCH] Fix NPE -- check isCancelled in onPostExecute Bug 3024665 Change-Id: I97c122a6c66a7d4245187961cb90ea874d0e305d --- src/com/android/email/activity/MessageViewFragmentBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/email/activity/MessageViewFragmentBase.java b/src/com/android/email/activity/MessageViewFragmentBase.java index 4ec4f9f2d..89c05b793 100644 --- a/src/com/android/email/activity/MessageViewFragmentBase.java +++ b/src/com/android/email/activity/MessageViewFragmentBase.java @@ -760,7 +760,7 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O @Override protected void onPostExecute(Attachment[] attachments) { - if (attachments == null) { + if (isCancelled() || attachments == null) { return; } boolean htmlChanged = false;