https://bugzilla.novell.com/show_bug.cgi?id=334244
Summary: Form.CheckAcceptButton throws nullref with non-standard
button
Product: Mono: Class Libraries
Version: 1.2
Platform: i686
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
QAContact: [EMAIL PROTECTED]
Found By: ---
Using a set of non-standard button classes I have found an issue in the
Form.AcceptButton method. Problem is with this piece of code:
internal override void CheckAcceptButton()
{
if (accept_button != null) {
Button a_button = accept_button as Button;
if (ActiveControl == a_button)
return;
if (ActiveControl is Button) {
a_button.paint_as_acceptbutton = false;
a_button.Invalidate();
return;
} else {
a_button.paint_as_acceptbutton = true;
a_button.Invalidate();
}
}
}
While accept_button is defined in MSDN as IButtonControl, here it is casted to
Button. The result is that a form with an non-standard Button in the
acceptbutton property throws a nullref.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs