wxFrameBase doesn't have wxRTTI so don't test for it, or

wxDynamicCast (for example) will erroneously succeed and
return the wrong cast object


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2005-04-12 07:33:20 +00:00
parent 276612f7e4
commit b2e3be1c69
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ wxStatusBarBase::~wxStatusBarBase()
// notify the frame that it doesn't have a status bar any longer to avoid
// dangling pointers
wxFrameBase *frame = wxDynamicCast(GetParent(), wxFrameBase);
wxFrame *frame = wxDynamicCast(GetParent(), wxFrame);
if ( frame && frame->GetStatusBar() == this )
{
frame->SetStatusBar(NULL);

View File

@ -451,7 +451,7 @@ wxToolBarBase::~wxToolBarBase()
// notify the frame that it doesn't have a tool bar any longer to avoid
// dangling pointers
wxFrameBase *frame = wxDynamicCast(GetParent(), wxFrameBase);
wxFrame *frame = wxDynamicCast(GetParent(), wxFrame);
if ( frame && frame->GetToolBar() == this )
{
frame->SetToolBar(NULL);