Menu

#50 IniWriter throws null reference exception

v1.1.0
open
nobody
INI (26)
5
2010-07-01
2010-07-01
No

The Dispose() method must check that objects exist before calling Close(). i.e.

if (textWriter != null) textWriter.Close();
if (baseStream != null) baseStream.Close();

Otherwise IniWriter.Dispose() will throw exception. Typically baseStream is not defined when this occurs.

Discussion


Log in to post a comment.