Merge pull request #148 from how02/fix-unhandled-exception

Fixed a NullReferenceException when synchronizing gmail
This commit is contained in:
Burak Kaan Köse
2024-04-18 09:46:17 +02:00
committed by GitHub

View File

@@ -904,10 +904,13 @@ namespace Wino.Core.Synchronizers
// Local copy doesn't exists. Continue execution to insert mail copy. // Local copy doesn't exists. Continue execution to insert mail copy.
} }
if (message.LabelIds is not null)
{
foreach (var labelId in message.LabelIds) foreach (var labelId in message.LabelIds)
{ {
packageList.Add(new NewMailItemPackage(mailCopy, mimeMessage, labelId)); packageList.Add(new NewMailItemPackage(mailCopy, mimeMessage, labelId));
} }
}
return packageList; return packageList;
} }