From: Vadim Zeitlin Date: Tue, 7 Aug 2001 15:12:33 +0000 (+0000) Subject: compilation fix X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/93488eee91771528926ec2ef0664bc4d2f15a100?ds=inline compilation fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/motif/control.cpp b/src/motif/control.cpp index 310c2c6861..6413b92103 100644 --- a/src/motif/control.cpp +++ b/src/motif/control.cpp @@ -66,12 +66,8 @@ wxControl::~wxControl() { // If we delete an item, we should initialize the parent panel, // because it could now be invalid. - wxPanel *panel = wxDynamicCast(GetParent(), wxPanel); - if (panel) - { - if ( (wxControl *)panel->GetDefaultItem() == this) - panel->SetDefaultItem((wxButton*) NULL); - } + if ( GetParent()->panel->GetDefaultItem() == this) + panel->SetDefaultItem(NULL); } void wxControl::SetLabel(const wxString& label)