Sicos1977 / MSGReader

C# Outlook MSG file reader without the need for Outlook
http://sicos1977.github.io/MSGReader
MIT License
478 stars 168 forks source link

NRE in Message.get_Attachments after updating from MSGReader 4.4.4 to 4.4.5 #306

Closed dominik1996 closed 2 years ago

dominik1996 commented 2 years ago

Describe the bug Updating from MSGReader 4.4.4 to 4.4.5 causes a NullReferenceException reading MsgReader.Outlook.Storage.Message Attachments on specific files.

To Reproduce

using var message = new Storage.Message(MsgWithRtfBody);

var attachments = message.Attachments;

This code causes a NRE:

'message.Attachments' threw an exception of type 'System.NullReferenceException' at MsgReader.Outlook.Storage.Message.get_Attachments()

I cannot attach the specific file publicly, if the file is needed please let me know a way to send it to you.

Cyril12740 commented 2 years ago

Yes i have the same issue and i had made an pull request to resolved the exceptions #307.

Sicos1977 commented 2 years ago

I merged your pull request, i'll make a new nuget package tomorrow (already late overhere)

Sicos1977 commented 2 years ago

Just released a new nuget package