X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d8c736e563cbf50bc5825c1a52878403ee48f513..7946d7deaac081a745dc616a5eb13ae864865fa2:/src/mac/carbon/button.cpp diff --git a/src/mac/carbon/button.cpp b/src/mac/carbon/button.cpp index d4837fd54a..e8a9b079b6 100644 --- a/src/mac/carbon/button.cpp +++ b/src/mac/carbon/button.cpp @@ -53,11 +53,12 @@ void wxButton::SetDefault() wxPanel *panel = wxDynamicCast(parent, wxPanel); if ( panel ) { - btnOldDefault = panel->GetDefaultItem(); + btnOldDefault = wxDynamicCast(panel->GetDefaultItem(), + wxButton); panel->SetDefaultItem(this); } -#ifdef __UNIX__ +#ifdef __DARWIN__ Boolean inData; if ( btnOldDefault && btnOldDefault->m_macControl ) {