[geary] Fix critical warning when loading attachment-only messages.



commit cd0aa24ba9878c1bbb257390e95cd311ead01b1c
Author: Michael James Gratton <mike vee net>
Date:   Tue Aug 2 22:37:36 2016 +1000

    Fix critical warning when loading attachment-only messages.
    
    Additional follow-up to Bug 767438.
    
    * src/client/conversation-viewer/conversation-viewer.vala
      (ConversationViewer::set_message_html): Always call
      ::insert_html_markup since that is where we are taking care of a
      possibly null body_text.

 .../conversation-viewer/conversation-viewer.vala   |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-viewer.vala 
b/src/client/conversation-viewer/conversation-viewer.vala
index 99fbb58..95ec418 100644
--- a/src/client/conversation-viewer/conversation-viewer.vala
+++ b/src/client/conversation-viewer/conversation-viewer.vala
@@ -898,18 +898,19 @@ public class ConversationViewer : Gtk.Box {
         //
 
         string? body_text = null;
-        remote_images = false;
         try {
             if (message.has_html_body()) {
                 body_text = message.get_html_body(inline_image_replacer);
             } else {
                 body_text = message.get_plain_body(true, inline_image_replacer);
             }
-            body_text = insert_html_markup(body_text ?? "", message, out remote_images);
         } catch (Error err) {
             debug("Could not get message text. %s", err.message);
         }
 
+        remote_images = false;
+        body_text = insert_html_markup(body_text ?? "", message, out remote_images);
+        
         // Graft header and email body into the email container.
         try {
             WebKit.DOM.HTMLElement table_header =


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