* MenuStrip.cs, ToolStrip.cs: Guard against an NRE when pressing
the menu key and there are no items on the menu.
[Fixes bug #386644]
svn path=/trunk/mcs/; revision=102531
+2008-05-05 Jonathan Pobst <monkey@jpobst.com>
+
+ * MenuStrip.cs, ToolStrip.cs: Guard against an NRE when pressing
+ the menu key and there are no items on the menu.
+ [Fixes bug #386644]
+
2008-05-05 Sebastien Pouliot <sebastien@ximian.com>
* Control.cs: Avoid calling ToString on a string.
ToolStripManager.SetActiveToolStrip (this, true);
ToolStripItem tsi = this.SelectNextToolStripItem (null, true);
+ if (tsi == null)
+ return false;
+
if (tsi is MdiControlStrip.SystemMenuItem)
this.SelectNextToolStripItem (tsi, true);
{
ToolStripItem next_item = this.GetNextItem (start, forward ? ArrowDirection.Right : ArrowDirection.Left);
+ if (next_item == null)
+ return next_item;
+
this.ChangeSelection (next_item);
if (next_item is ToolStripControlHost)