[geary] Fix crash when replying to email with null from address.



commit 557a9e75b79d2f0af44388765ffe44ba445e2578
Author: Michael James Gratton <mike vee net>
Date:   Tue Jul 26 09:38:49 2016 +1000

    Fix crash when replying to email with null from address.

 src/engine/rfc822/rfc822-utils.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/engine/rfc822/rfc822-utils.vala b/src/engine/rfc822/rfc822-utils.vala
index a71caaf..41da289 100644
--- a/src/engine/rfc822/rfc822-utils.vala
+++ b/src/engine/rfc822/rfc822-utils.vala
@@ -70,9 +70,9 @@ private void remove_address(Gee.List<Geary.RFC822.MailboxAddress> addresses,
 }
 
 private bool email_is_from_sender(Geary.Email email, Gee.List<RFC822.MailboxAddress>? sender_addresses) {
-    if (sender_addresses == null)
+    if (sender_addresses == null || email.from == null)
         return false;
-    
+
     return Geary.traverse<RFC822.MailboxAddress>(sender_addresses)
         .any(a => email.from.get_all().contains(a));
 }


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