Fixed an NRE that could occur under some circumstances.

This commit is contained in:
the_fiddler 2008-03-15 11:26:31 +00:00
parent d15062a6f5
commit 8a6171e28b

View file

@ -52,7 +52,7 @@ namespace OpenTK
public static implicit operator IntPtr(ContextHandle c) public static implicit operator IntPtr(ContextHandle c)
{ {
return c.handle; return c != null ? c.handle : IntPtr.Zero;
} }
public static implicit operator ContextHandle(IntPtr p) public static implicit operator ContextHandle(IntPtr p)