System.NullReferenceException
Wilhelm Patrick <[email protected]>
| Newsgroups | gmane.comp.lib.wxwindows.wxnet |
|---|---|
| Message-ID | <BCB494E8B7BF2D40B56D1164C67BC2A8015520FE@kher443a.ww004.siemens.net> |
Hi!
I wrote a class with membervariable of the type wx.Font. Everything works
fine with the font, but when I close my Application I get an error:
An unhandled exception of type 'System.NullReferenceException' occurred in
wx.net.dll
Additional information: Object reference not set to an instance of an
object.
The code where the debugger stops (in Object.cs):
protected void Dispose(bool disposing)
{
if (!disposed)
{
if (wxObject != IntPtr.Zero)
{
wxObject_dtor(wxObject);
//wxObject = IntPtr.Zero;
}
}
-> disposed = true;
}
the current object is a wx.Font object.
When I remove the following lines in Font.cs I don't get any errors:
public static Font wxNORMAL_FONT = new Font(wxFont_NORMAL_FONT());
public static Font wxSMALL_FONT = new Font(wxFont_SMALL_FONT());
public static Font wxITALIC_FONT = new Font(wxFont_ITALIC_FONT());
public static Font wxSWISS_FONT = new Font(wxFont_SWISS_FONT());
Any ideas about the reason of this error?
Mit freundlichem Gruß / kind regards
SIEMENS AG
Patrick Wilhelm
A&D SE DT RD
Siemensallee 84
D-76181 Karlsruhe, Germany
Email: [email protected]
<mailto:[email protected]>
Tel.: +49 (721) 595 3075
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf