* Control.cs: When assigning ContextMenu, do a null check before assigning its container field. svn path=/trunk/mcs/; revision=133865
@@ -1,3 +1,8 @@
+2009-05-10 Carlos Alberto Cortez <[email protected]>
+
+ * Control.cs: When assigning ContextMenu, do a null check before
+ assigning its container field.
2009-05-08 Brad Taylor <[email protected]>
* DateTimePicker.cs: Add a UIA-specific property to ensure that if
@@ -2590,7 +2590,8 @@ namespace System.Windows.Forms
set {
if (this.context_menu_strip != value) {
this.context_menu_strip = value;
- value.container = this;
+ if (value != null)
+ value.container = this;
OnContextMenuStripChanged (EventArgs.Empty);
}