Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEveraldo Canuto <everaldo@mono-cvs.ximian.com>2008-10-01 17:20:38 +0400
committerEveraldo Canuto <everaldo@mono-cvs.ximian.com>2008-10-01 17:20:38 +0400
commite117097e1f1f8a3cddaac9fb71d86661b6a10b22 (patch)
tree791a1983e013b7966d2482ff65dfd3cf03a776ff
parent95d855ebdd15281566aafc65ddfb26dcd270db74 (diff)
In System.Windows.Forms:mono-2.0
2008-09-30 Everaldo Canuto <ecanuto@novell.com> * MenuAPI.cs: Prevent NRE when deactivate menu. Fixes #413636. svn path=/branches/mono-2-0/mcs/; revision=114557
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog4
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs3
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;