[geary/mjog/rfc-reply-refs-critical] engine: Fix critical when replying to an email with zero message ids
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/rfc-reply-refs-critical] engine: Fix critical when replying to an email with zero message ids
- Date: Sun, 4 Apr 2021 02:53:36 +0000 (UTC)
commit 388414c2320b1c85047eeec7c330be78e0630ef6
Author: Michael Gratton <mike vee net>
Date: Sun Apr 4 12:50:16 2021 +1000
engine: Fix critical when replying to an email with zero message ids
Don't ever return null from `Geary.RFC822.Utils.reply_references`
return null, since its one call site in the client expects it to be
non-null.
src/engine/rfc822/rfc822-utils.vala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/engine/rfc822/rfc822-utils.vala b/src/engine/rfc822/rfc822-utils.vala
index e0b0bee55..65ab43a7d 100644
--- a/src/engine/rfc822/rfc822-utils.vala
+++ b/src/engine/rfc822/rfc822-utils.vala
@@ -100,7 +100,7 @@ namespace Geary.RFC822.Utils {
}
/** Generate a References header value in reply to a message. */
- public MessageIDList? reply_references(Email source) {
+ public MessageIDList reply_references(Email source) {
var list = new Gee.LinkedList<MessageID>();
// 1. Start with the source's References list
@@ -122,7 +122,7 @@ namespace Geary.RFC822.Utils {
list.add(source.message_id);
}
- return (list.is_empty) ? null : new MessageIDList(list);
+ return new MessageIDList(list);
}
public string email_addresses_for_reply(MailboxAddresses? addresses,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]