[geary] Handle null body-text quoting in replies: Closes bgo#714013



commit dec6daf5ded3ae89c1ef746320457b9cef07c8a9
Author: Wolfgang Steitz <wolfer7 web de>
Date:   Mon Feb 24 15:36:47 2014 -0800

    Handle null body-text quoting in replies: Closes bgo#714013

 src/engine/rfc822/rfc822-utils.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/engine/rfc822/rfc822-utils.vala b/src/engine/rfc822/rfc822-utils.vala
index 05b7d9e..747cc4f 100644
--- a/src/engine/rfc822/rfc822-utils.vala
+++ b/src/engine/rfc822/rfc822-utils.vala
@@ -232,7 +232,7 @@ public string quote_email_for_forward(Geary.Email email, bool html_format) {
 }
 
 private string quote_body(Geary.Email email, bool use_quotes, bool html_format) {
-    string body_text = "";
+    string? body_text = "";
     
     try {
         body_text = email.get_message().get_body(html_format);
@@ -241,7 +241,7 @@ private string quote_body(Geary.Email email, bool use_quotes, bool html_format)
     }
     
     // Wrap the whole thing in a blockquote.
-    if (use_quotes)
+    if (use_quotes && !String.is_empty(body_text))
         body_text = "<blockquote type=\"cite\">%s</blockquote>".printf(body_text);
     
     return body_text;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]