System.NullReferenceException when assigning null to Session.SessionLogPath

Advertisement

aidanwhitehall-dfs
Joined:
Posts:
1

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.

WinSCP SessionLogPath.png

Reply with quote

Advertisement

You can post new topics in this forum