diff options
author | Ungureanu Marius <teromario@yahoo.com> | 2013-11-24 05:32:04 +0400 |
---|---|---|
committer | Ungureanu Marius <teromario@yahoo.com> | 2013-11-24 05:32:04 +0400 |
commit | 4fa2c8ee322915120c12e020e15cc15e6bd1e21a (patch) | |
tree | 2b5a6184ebe3d40e0b8deb09550b40a5e73298dc /Mono.Addins.Gui | |
parent | 2691fedc346af1320781fe1a0b2d0c68fc18d937 (diff) |
Let us handle cases where parent is null. Sanity check for child
Diffstat (limited to 'Mono.Addins.Gui')
-rw-r--r-- | Mono.Addins.Gui/Mono.Addins.Gui/Services.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Mono.Addins.Gui/Mono.Addins.Gui/Services.cs b/Mono.Addins.Gui/Mono.Addins.Gui/Services.cs index 4259f4e..bd90d7b 100644 --- a/Mono.Addins.Gui/Mono.Addins.Gui/Services.cs +++ b/Mono.Addins.Gui/Mono.Addins.Gui/Services.cs @@ -139,6 +139,9 @@ namespace Mono.Addins.Gui /// <summary>Centers a window relative to its parent.</summary> static void CenterWindow (Window child, Window parent) { + if (child == null || parent == null) + return; + child.Child.Show (); int w, h, winw, winh, x, y, winx, winy; child.GetSize (out w, out h); |