diff options
-rw-r--r-- | mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index 8ef5c0c9adc..702759cd349 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -1,3 +1,7 @@ +2008-09-30 Everaldo Canuto <ecanuto@novell.com> + + * MenuAPI.cs: Prevent NRE when deactivate menu. Fixes #413636. + 2008-09-08 Ivan N. Zlatev <contact@i-nz.net> * ErrorProvider.cs: Unbreak my previous commit. diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs index 2cca05d899f..e496db29e53 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs @@ -93,7 +93,8 @@ namespace System.Windows.Forms { active = false; popup_active = false; hotkey_active = false; - GrabControl.ActiveTracker = null; + if (GrabControl != null) + GrabControl.ActiveTracker = null; keynav_state = KeyNavState.Idle; if (TopMenu is ContextMenu) { PopUpWindow puw = TopMenu.Wnd as PopUpWindow; |