diff --git a/Source/OpenTK/Platform/Windows/WindowInfo.cs b/Source/OpenTK/Platform/Windows/WindowInfo.cs index 21b800c8..b8ea7130 100644 --- a/Source/OpenTK/Platform/Windows/WindowInfo.cs +++ b/Source/OpenTK/Platform/Windows/WindowInfo.cs @@ -32,7 +32,7 @@ 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.ToString()); + this.Handle, System.Environment.NewLine, this.Parent != null ? this.Parent.ToString() : "null"); } } diff --git a/Source/OpenTK/Platform/X11/WindowInfo.cs b/Source/OpenTK/Platform/X11/WindowInfo.cs index 39ae7b46..792d65ba 100644 --- a/Source/OpenTK/Platform/X11/WindowInfo.cs +++ b/Source/OpenTK/Platform/X11/WindowInfo.cs @@ -35,7 +35,7 @@ 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.ToString()); + this.Display, this.Screen, this.Handle, System.Environment.NewLine, this.Parent != null ? this.Parent.ToString() : "null"); } } }