[mono/mono-addins] 4fa2c8ee: Let us handle cases where parent is null. Sanity check for child

"Ungureanu Marius ([email protected])" <[email protected]> Sun, 24 Nov 2013 01:33:25 +0000
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <0000014287bd644e-e6cfa76a-eea2-405c-82d3-05502a18e5b6-000000@email.amazonses.com>
   Branch: refs/heads/bug3700
     Home: https://github.com/mono/mono-addins
  Compare: https://github.com/mono/mono-addins/commit/4fa2c8ee3229

   Commit: 4fa2c8ee322915120c12e020e15cc15e6bd1e21a
   Author: Ungureanu Marius <[email protected]> (Therzok)
     Date: 2013-11-24 01:32:04 GMT
      URL: https://github.com/mono/mono-addins/commit/4fa2c8ee322915120c12e020e15cc15e6bd1e21a

Let us handle cases where parent is null. Sanity check for child

Changed paths:
  M Mono.Addins.Gui/Mono.Addins.Gui/Services.cs

Modified: Mono.Addins.Gui/Mono.Addins.Gui/Services.cs
===================================================================
@@ -139,6 +139,9 @@ public static void PlaceDialog (Window child, Window parent)
 		/// <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);


_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches