[geary/geary-0.11] Fix ConversationViewer crit assertion displaying messages with no body.



commit 384d158d068940ab3b88f3a5ca161f39b5a908b3
Author: Michael James Gratton <mike vee net>
Date:   Wed Jul 6 17:31:44 2016 +1000

    Fix ConversationViewer crit assertion displaying messages with no body.
    
    Bug 767438
    
    * src/client/conversation-viewer/conversation-viewer.vala
      (::set_message_html): Body text may be null if there's no HTML or plain
      body parts, so allow for it and check before passing to
      ::insert_html_markup.

 .../conversation-viewer/conversation-viewer.vala   |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-viewer.vala 
b/src/client/conversation-viewer/conversation-viewer.vala
index bf1dea1..6605478 100644
--- a/src/client/conversation-viewer/conversation-viewer.vala
+++ b/src/client/conversation-viewer/conversation-viewer.vala
@@ -868,8 +868,8 @@ public class ConversationViewer : Gtk.Box {
         // that are actually attachments (in particular, get_body() considers their
         // Content-Disposition)
         //
-        
-        string body_text = "";
+
+        string? body_text = null;
         remote_images = false;
         try {
             if (message.has_html_body()) {
@@ -877,7 +877,7 @@ public class ConversationViewer : Gtk.Box {
             } else {
                 body_text = message.get_plain_body(true, inline_image_replacer);
             }
-            body_text = insert_html_markup(body_text, message, out remote_images);
+            body_text = insert_html_markup(body_text ?? "", message, out remote_images);
         } catch (Error err) {
             debug("Could not get message text. %s", err.message);
         }


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