diff --git a/src/motif/button.cpp b/src/motif/button.cpp index 44f1f521db..610a94ef19 100644 --- a/src/motif/button.cpp +++ b/src/motif/button.cpp @@ -100,7 +100,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, void wxButton::SetDefault() { wxWindow *parent = GetParent(); - wxPanel *panel = wxDynamicCast(panel, wxPanel); + wxPanel *panel = wxDynamicCast(parent, wxPanel); if ( panel ) panel->SetDefaultItem(this);