Author: everaldo
Date: 2007-03-30 13:36:34 -0500 (Fri, 30 Mar 2007)
New Revision: 75224
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuItem.cs
Log:
2007-03-30 Everaldo Canuto <[EMAIL PROTECTED]>
* MenuItem.cs: On invalidate prevent form to create handle. [Fixes
#81272]
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-03-30 18:17:52 UTC (rev 75223)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-03-30 18:36:34 UTC (rev 75224)
@@ -1,3 +1,7 @@
+2007-03-30 Everaldo Canuto <[EMAIL PROTECTED]>
+
+ * MenuItem.cs: On invalidate prevent form to create handle. [Fixes
#81272]
+
2007-03-30 Jonathan Pobst <[EMAIL PROTECTED]>
* ScollableControl.cs: Add HorizontalScroll and VerticalScroll
properties.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuItem.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuItem.cs
2007-03-30 18:17:52 UTC (rev 75223)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuItem.cs
2007-03-30 18:36:34 UTC (rev 75224)
@@ -575,8 +575,14 @@
internal virtual void Invalidate ()
{
- if ((Parent != null) && (Parent is MainMenu) &&
Parent.Wnd != null)
- XplatUI.RequestNCRecalc (Parent.Wnd.FindForm
().Handle);
+ if ((Parent == null) || !(Parent is MainMenu) ||
(Parent.Wnd == null))
+ return;
+
+ Form form = Parent.Wnd.FindForm ();
+ if ((form == null) || (!form.IsHandleCreated))
+ return;
+
+ XplatUI.RequestNCRecalc (form.Handle);
}
internal void PerformPopup ()
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches