Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

aidanwhitehall-dfs

System.NullReferenceException when assigning null to Session.SessionLogPath

With WinSCP.exe 6.5.6, when creating a new Session object in C# using object initialisation syntax:

    it's possible to assign null to DebugLogPath
    it's possible to assign null to XmlLogPath
    attempting to assign null to SessionLogPath throws System.NullReferenceException ('Object reference not set to an instance of an object.')


The workaround is to add a null-check prior to assignment.

For consistency, can the code be updated so all LogPath parameters accept an assignment of null?

Thanks.