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



commit 0afc9d4d7d44eb0e0344727ffd10622272b928b8
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 7875bd9..ee7adf9 100644
--- a/src/client/conversation-viewer/conversation-viewer.vala
+++ b/src/client/conversation-viewer/conversation-viewer.vala
@@ -875,18 +875,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]