]> git.saurik.com Git - wxWidgets.git/commitdiff
wxFrameBase doesn't have wxRTTI so don't test for it, or
authorJulian Smart <julian@anthemion.co.uk>
Tue, 12 Apr 2005 07:33:20 +0000 (07:33 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 12 Apr 2005 07:33:20 +0000 (07:33 +0000)
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

src/common/statbar.cpp
src/common/tbarbase.cpp

index 0544a98b67530e815a1049dfb1ccbed8dfdfb6b4..5d37684b7dec17d7b19c939ec6fb2583241e538b 100644 (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);
index b7dfb3c5ba46d8ca3578af9710bfd7ffb8ef1543..fd1e4d2bdd4dfd9fe532ff7a7fc17622fd2c0d24 100644 (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);