Avoid crashing when forwarding mails with no Subject header

pull/41/head
Ludovic Marcotte 2014-05-30 08:41:42 -04:00
parent dace1439df
commit f0dfe37a55
2 changed files with 15 additions and 4 deletions

10
NEWS
View File

@ -1,3 +1,13 @@
2.2.5 (2014-XX-XX)
------------------
New features
Enhancements
Bug fixes
- avoid crashing when we forward an email with no Subject header
2.2.4 (2014-05-29)
------------------

View File

@ -1602,10 +1602,11 @@ static NSString *userAgent = nil;
/* add subject */
if ([(s = [headers objectForKey: @"subject"]) length] > 0)
[map setObject: [s asQPSubjectString: @"utf-8"]
forKey: @"subject"];
[map setObject: [headers objectForKey: @"message-id"]
forKey: @"message-id"];
forKey: @"subject"];
if ([(s = [headers objectForKey: @"message-id"]) length] > 0)
[map setObject: s
forKey: @"message-id"];
/* add standard headers */
dateString = [[NSCalendarDate date] rfc822DateString];