From 2b7f7bbc24e01f0fe73937a5d66baad5f243b4e9 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 5 Aug 2007 16:19:25 +0000 Subject: [PATCH] Corrected an error, where keysyms were not allocated, causing an NRE. --- Source/OpenTK/Platform/X11/X11Keyboard.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/OpenTK/Platform/X11/X11Keyboard.cs b/Source/OpenTK/Platform/X11/X11Keyboard.cs index d0f1e005..bdd9252b 100644 --- a/Source/OpenTK/Platform/X11/X11Keyboard.cs +++ b/Source/OpenTK/Platform/X11/X11Keyboard.cs @@ -107,7 +107,7 @@ namespace OpenTK.Platform.X11 IntPtr keysym_ptr = API.GetKeyboardMapping(window.Display, (byte)firstKeyCode, lastKeyCode - firstKeyCode + 1, ref keysyms_per_keycode); - Marshal.PtrToStructure(keysym_ptr, keysyms); + keysyms = (IntPtr[])Marshal.PtrToStructure(keysym_ptr, typeof(IntPtr[])); API.Free(keysym_ptr); }