fixed spurious assert in FindControl() (fixes patch 696147)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -229,12 +229,20 @@ wxControl *wxToolBarBase::FindControl( int id )
|
||||
node;
|
||||
node = node->GetNext() )
|
||||
{
|
||||
wxControl *control = node->GetData()->GetControl();
|
||||
|
||||
if (control)
|
||||
const wxToolBarToolBase * const tool = node->GetData();
|
||||
if ( tool->IsControl() )
|
||||
{
|
||||
if (control->GetId() == id)
|
||||
wxControl * const control = tool->GetControl();
|
||||
|
||||
if ( !control )
|
||||
{
|
||||
wxFAIL_MSG( _T("NULL control in toolbar?") );
|
||||
}
|
||||
else if ( control->GetId() == id )
|
||||
{
|
||||
// found
|
||||
return control;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user