1
Vote

Null reference exception

description

Trying your sample, i've got sometime a null reference exception in the 2D example tab when resizing the window.
The problem occured in the PaintWinformControl method because the "graphics" parameter is null.
It occures when the form is too small ( control height is less or equal to 0,0 ) , but sometime it occurs when the control height is greater than 0.

comments

xCr wrote Dec 23, 2008 at 4:24 PM

I am using interop to show flash files. I have resolved this null reference error by changing line "if (scan0 != _prevScan0)" to "if (scan0 != _prevScan0 || _gdiBitmapGraphics == null)" in Win32HostRenderer.cs

wrote Feb 14, 2013 at 12:10 AM