G
Guest
I have a form that contains a wrapper class for a TcpConnection that is to be
used as an MDI Child form. Sometimes, when this form is closed from the main
form, it will throw a System.NullReferenceException in the default Dispose
override method (provided by the form designer).
protected override void Dispose( bool disposing )
{
if(disposing)
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
It is throwing on the base.Dispose( disposing ); line and saying "Additional
information: Object reference not set to an instance of an object." I'm not
really sure as to what the cause is of this but it is the only mdi child (out
of about 20) that throws and exception, so I assume it may be related to the
connection class. FYI, I have a public property to the connection class in
the form.
Anyone know the solution?
Thanks,
Jonathan
used as an MDI Child form. Sometimes, when this form is closed from the main
form, it will throw a System.NullReferenceException in the default Dispose
override method (provided by the form designer).
protected override void Dispose( bool disposing )
{
if(disposing)
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
It is throwing on the base.Dispose( disposing ); line and saying "Additional
information: Object reference not set to an instance of an object." I'm not
really sure as to what the cause is of this but it is the only mdi child (out
of about 20) that throws and exception, so I assume it may be related to the
connection class. FYI, I have a public property to the connection class in
the form.
Anyone know the solution?
Thanks,
Jonathan