From 93488eee91771528926ec2ef0664bc4d2f15a100 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 7 Aug 2001 15:12:33 +0000 Subject: [PATCH] compilation fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/motif/control.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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)