Author: jpobst
Date: 2007-12-27 10:18:13 -0500 (Thu, 27 Dec 2007)
New Revision: 91941
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs
Log:
2007-12-27 Jonathan Pobst <[EMAIL PROTECTED]>
* ToolStrip.cs: Guard against an NRE after ItemClicked is called, the
user may have moved the mouse off the current item during the event.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-12-27 14:40:40 UTC (rev 91940)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-12-27 15:18:13 UTC (rev 91941)
@@ -1,3 +1,8 @@
+2007-12-27 Jonathan Pobst <[EMAIL PROTECTED]>
+
+ * ToolStrip.cs: Guard against an NRE after ItemClicked is called, the
+ user may have moved the mouse off the current item during the event.
+
2007-12-23 Carlos Alberto Cortez <[EMAIL PROTECTED]>
* ListView.cs: In ItemControl.ItemsMouseMove, try to avoid
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs
2007-12-27 14:40:40 UTC (rev 91940)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs
2007-12-27 15:18:13 UTC (rev 91941)
@@ -948,7 +948,8 @@
OnItemClicked (new
ToolStripItemClickedEventArgs (mouse_currently_over));
// Fire the item's MouseUp event
- mouse_currently_over.FireEvent (mea,
ToolStripItemEventType.MouseUp);
+ if (mouse_currently_over == null)
+ mouse_currently_over.FireEvent (mea,
ToolStripItemEventType.MouseUp);
// The event handler may have blocked until the
mouse moved off of the ToolStripItem
if (mouse_currently_over == null)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches