From 8b1488153864f54d463a20a1fd2a52455b778126 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Tue, 15 Jan 2008 11:02:23 +0000 Subject: [PATCH] Fixed a NRE. --- Source/OpenTK/Platform/X11/X11GLContext.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/OpenTK/Platform/X11/X11GLContext.cs b/Source/OpenTK/Platform/X11/X11GLContext.cs index 8dce9632..bc27eb00 100644 --- a/Source/OpenTK/Platform/X11/X11GLContext.cs +++ b/Source/OpenTK/Platform/X11/X11GLContext.cs @@ -22,7 +22,7 @@ namespace OpenTK.Platform.X11 { private IntPtr context; private DisplayMode mode; - private WindowInfo windowInfo; + private WindowInfo windowInfo = new WindowInfo(); private IntPtr visual; private bool disposed; @@ -88,6 +88,7 @@ namespace OpenTK.Platform.X11 visualAttributes.Add((int)0); } + windowInfo.CopyInfoFrom(info); visual = Glx.ChooseVisual(((X11.WindowInfo)info).Display, ((X11.WindowInfo)info).Screen, visualAttributes.ToArray()); if (visual == IntPtr.Zero) return false;