X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f5c6eb5c178b44f4400495e06274ffd130635190..79da30927621c8ab01ff9e9a834331b922e7fbd1:/src/mac/carbon/button.cpp diff --git a/src/mac/carbon/button.cpp b/src/mac/carbon/button.cpp index 363789a945..e8a9b079b6 100644 --- a/src/mac/carbon/button.cpp +++ b/src/mac/carbon/button.cpp @@ -53,7 +53,8 @@ void wxButton::SetDefault() wxPanel *panel = wxDynamicCast(parent, wxPanel); if ( panel ) { - btnOldDefault = panel->GetDefaultItem(); + btnOldDefault = wxDynamicCast(panel->GetDefaultItem(), + wxButton); panel->SetDefaultItem(this); }