diff --git a/src/common/init.cpp b/src/common/init.cpp index 934ba275d2..d9d3cf0dc7 100644 --- a/src/common/init.cpp +++ b/src/common/init.cpp @@ -269,7 +269,7 @@ static bool DoCommonPostInit() } // yes; test if it implements Clone() correctly - wxEvent* test = dynamic_cast(ci->CreateObject()); + wxEvent* test = wxDynamicCast(ci->CreateObject(),wxEvent); if (test == NULL) { wxLogWarning("The event class '%s' should have a DECLARE_DYNAMIC_CLASS macro!", diff --git a/src/common/statbar.cpp b/src/common/statbar.cpp index 9db337c9a5..30af252d14 100644 --- a/src/common/statbar.cpp +++ b/src/common/statbar.cpp @@ -58,7 +58,7 @@ wxStatusBarBase::~wxStatusBarBase() { // notify the frame that it doesn't have a status bar any longer to avoid // dangling pointers - wxFrame *frame = dynamic_cast(GetParent()); + wxFrame *frame = wxDynamicCast(GetParent(), wxFrame); if ( frame && frame->GetStatusBar() == this ) frame->SetStatusBar(NULL); }