Prevent DataGridViewTextBoxCell from using Disposed editor object
authorStephen McConnel <stephen_mcconnel@sil.org>
Thu, 21 May 2015 22:48:53 +0000 (17:48 -0500)
committerStephen McConnel <stephen_mcconnel@sil.org>
Thu, 21 May 2015 22:48:53 +0000 (17:48 -0500)
This fixes https://bugzilla.xamarin.com/show_bug.cgi?id=30325.

mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewTextBoxCell.cs

index d5b65806e71678cfc5cb0fc73891c2abce553133..13862bb5d506c0a223f994d882cadfaf16cb1d43 100644 (file)
@@ -90,7 +90,7 @@ namespace System.Windows.Forms {
                                throw new InvalidOperationException("There is no associated DataGridView.");
                        }
 
-                       if (editingControl == null)
+                       if (editingControl == null || editingControl.IsDisposed)
                                CreateEditingControl ();
 
                        DataGridView.EditingControlInternal = editingControl;