From 55f5256761bb1e509c147fbb817fa2b43722dfc0 Mon Sep 17 00:00:00 2001 From: Mihai Preda Date: Wed, 16 Dec 2009 18:12:34 +0100 Subject: [PATCH] MessageCompose: fix NPE cased by WebView set to null in onDestroy(). Bug 2329276. --- src/com/android/email/activity/MessageCompose.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/android/email/activity/MessageCompose.java b/src/com/android/email/activity/MessageCompose.java index aa4fd2144..1f5798e3b 100644 --- a/src/com/android/email/activity/MessageCompose.java +++ b/src/com/android/email/activity/MessageCompose.java @@ -1274,9 +1274,10 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus // EmailHtmlUtil.resolveInlineImage(getContentResolver(), mAccount, // text, message, 0); mQuotedTextBar.setVisibility(View.VISIBLE); - mQuotedText.setVisibility(View.VISIBLE); - mQuotedText.loadDataWithBaseURL("email://", text, "text/html", - "utf-8", null); + if (mQuotedText != null) { + mQuotedText.setVisibility(View.VISIBLE); + mQuotedText.loadDataWithBaseURL("email://", text, "text/html", "utf-8", null); + } } }