From ffc681a4da85c82c80d819ab8afb4442577c52a0 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Tue, 15 Sep 2009 13:07:59 -0700 Subject: [PATCH] Handle the case of no body being present (happens in unit tests) * Fixes #2121403 --- src/com/android/email/mail/transport/Rfc822Output.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/android/email/mail/transport/Rfc822Output.java b/src/com/android/email/mail/transport/Rfc822Output.java index f3503bab1..bc163c27e 100644 --- a/src/com/android/email/mail/transport/Rfc822Output.java +++ b/src/com/android/email/mail/transport/Rfc822Output.java @@ -62,6 +62,9 @@ public class Rfc822Output { /*package*/ static String buildBodyText(Context context, Message message, boolean appendQuotedText) { Body body = Body.restoreBodyWithMessageId(context, message.mId); + if (body == null) { + return null; + } String text = body.mTextContent; if (!appendQuotedText) {