[geary] Fix ConversationViewer crit assertion displaying messages with no body.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Fix ConversationViewer crit assertion displaying messages with no body.
- Date: Wed, 6 Jul 2016 07:32:23 +0000 (UTC)
commit cc8b79ba35035304c14fda0e8150ff47c443e71c
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 f2a72f0..225ed93 100644
--- a/src/client/conversation-viewer/conversation-viewer.vala
+++ b/src/client/conversation-viewer/conversation-viewer.vala
@@ -890,8 +890,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()) {
@@ -899,7 +899,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]