O
Oddball
Firstly I'd like to say hello. This is my first post having ghosted for some time - I know,
I'm a bad man.
I'm pretty sure this following post hasn't been adressed on the forum, I may be wrong -
it's quite large.
Why on this earth is the following line of code causing a NullReferenceException?
pfc = new PrivateFontCollection();
Here's the stack:
System.Drawing.SafeNativeMethods.GdipNewPrivateFontCollection(IntPtr&
fontCollection) +0
System.Drawing.Text.PrivateFontCollection..ctor()
Adquiesco2.RenderFont.Page_Load(Object sender, EventArgs e) in d:\web
design\active sites\adquiesco2\renderfont.aspx.cs:34
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
This has got me *confused*. It looks like some code *inside* the System.Drawing
collection is messing up... but surely this is caused by something I have done. The line
I have shown you is literaly the first line of code executed in the on Page_Load
method. Nothing happens before it!
------------------------------------
Another unchecked rambeling brought to you by:
Oddball
joshua@bf#N0SP4M#wd.co.uk
I'm a bad man.
I'm pretty sure this following post hasn't been adressed on the forum, I may be wrong -
it's quite large.
Why on this earth is the following line of code causing a NullReferenceException?
pfc = new PrivateFontCollection();
Here's the stack:
System.Drawing.SafeNativeMethods.GdipNewPrivateFontCollection(IntPtr&
fontCollection) +0
System.Drawing.Text.PrivateFontCollection..ctor()
Adquiesco2.RenderFont.Page_Load(Object sender, EventArgs e) in d:\web
design\active sites\adquiesco2\renderfont.aspx.cs:34
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
This has got me *confused*. It looks like some code *inside* the System.Drawing
collection is messing up... but surely this is caused by something I have done. The line
I have shown you is literaly the first line of code executed in the on Page_Load
method. Nothing happens before it!
------------------------------------
Another unchecked rambeling brought to you by:
Oddball
joshua@bf#N0SP4M#wd.co.uk