Corrected NRE in WindowInfo.ToString functions, when referring to non-existent parent.
This commit is contained in:
parent
a987a5daf6
commit
a56ababd8b
2 changed files with 2 additions and 2 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue