From 91d71b754e42f40ac37764b61351196e4114e4f1 Mon Sep 17 00:00:00 2001
From: the_fiddler <the_fiddler@ebc5dd9b-fb1d-0410-b6f8-d24c324e9604>
Date: Sun, 5 Aug 2007 16:54:14 +0000
Subject: [PATCH] Corrected NRE in X11Keyboard

---
 Source/OpenTK/Platform/Windows/WindowInfo.cs | 4 ++--
 Source/OpenTK/Platform/X11/WindowInfo.cs     | 4 ++--
 Source/OpenTK/Platform/X11/X11Keyboard.cs    | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Source/OpenTK/Platform/Windows/WindowInfo.cs b/Source/OpenTK/Platform/Windows/WindowInfo.cs
index b8ea7130..8b93d8e0 100644
--- a/Source/OpenTK/Platform/Windows/WindowInfo.cs
+++ b/Source/OpenTK/Platform/Windows/WindowInfo.cs
@@ -31,8 +31,8 @@ namespace OpenTK.Platform.Windows
 
         public override string ToString()
         {
-            return String.Format("Windows.WindowInfo: Handle {0}{1}    Parent {2}",
-                this.Handle, System.Environment.NewLine, this.Parent != null ? this.Parent.ToString() : "null");
+            return String.Format("Windows.WindowInfo: Handle {0}, Parent {1}",
+                this.Handle, this.Parent != null ? this.Parent.ToString() : "null");
         }
 
     }
diff --git a/Source/OpenTK/Platform/X11/WindowInfo.cs b/Source/OpenTK/Platform/X11/WindowInfo.cs
index 792d65ba..4ff39fd7 100644
--- a/Source/OpenTK/Platform/X11/WindowInfo.cs
+++ b/Source/OpenTK/Platform/X11/WindowInfo.cs
@@ -34,8 +34,8 @@ namespace OpenTK.Platform.X11
 
         public override string ToString()
         {
-            return String.Format("X11.WindowInfo: Display {0}, Screen {1}, Handle {2}{3}    Parent {4}",
-                this.Display, this.Screen, this.Handle, System.Environment.NewLine, this.Parent != null ? this.Parent.ToString() : "null");
+            return String.Format("X11.WindowInfo: Display {0}, Screen {1}, Handle {2}, Parent {3}",
+                this.Display, this.Screen, this.Handle, this.Parent != null ? this.Parent.ToString() : "null");
         }
     }
 }
diff --git a/Source/OpenTK/Platform/X11/X11Keyboard.cs b/Source/OpenTK/Platform/X11/X11Keyboard.cs
index 2a138f5f..ba157ed9 100644
--- a/Source/OpenTK/Platform/X11/X11Keyboard.cs
+++ b/Source/OpenTK/Platform/X11/X11Keyboard.cs
@@ -19,7 +19,7 @@ namespace OpenTK.Platform.X11
         WindowInfo window;
 
         private bool[] keys = new bool[(int)OpenTK.Input.Key.MaxKeys];
-        private List<Keyboard> keyboards;
+        private List<Keyboard> keyboards = new List<Keyboard>();
         private static Dictionary<XKey, Key> keymap = new Dictionary<XKey, Key>((int)Key.MaxKeys);
         /// <summary>
         /// The smallest and largest KeyCode supported by the X server. Queried through API.DisplayKeycodes()