Author: jpobst
Date: 2007-12-03 00:02:21 -0500 (Mon, 03 Dec 2007)
New Revision: 90539
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripManager.cs
Log:
2007-12-02 Jonathan Pobst <[EMAIL PROTECTED]>
* ToolStripManager.cs: Guard against an NRE I ran into.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-12-03 04:59:26 UTC (rev 90538)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-12-03 05:02:21 UTC (rev 90539)
@@ -1,5 +1,9 @@
2007-12-02 Jonathan Pobst <[EMAIL PROTECTED]>
+ * ToolStripManager.cs: Guard against an NRE I ran into.
+
+2007-12-02 Jonathan Pobst <[EMAIL PROTECTED]>
+
* LinkLabel.cs: Apply patch from George to fix bug 344012. If
a Link is manually added to the Links collection, we need to set
its owner, so it can invalidate properly.
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripManager.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripManager.cs
2007-12-03 04:59:26 UTC (rev 90538)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripManager.cs
2007-12-03 05:02:21 UTC (rev 90539)
@@ -507,6 +507,10 @@
// Get the parent form of this message
Form f = (Form)Control.FromHandle
(m.HWnd).TopLevelControl;
+ // If there isn't a Form with this, there isn't much we
can do
+ if (f == null)
+ return false;
+
// Check the MainMenuStrip property first
if (f.MainMenuStrip != null)
if (f.MainMenuStrip.OnMenuKey ())
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches