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 = node->GetNext() )
|
node = node->GetNext() )
|
||||||
{
|
{
|
||||||
wxControl *control = node->GetData()->GetControl();
|
const wxToolBarToolBase * const tool = node->GetData();
|
||||||
|
if ( tool->IsControl() )
|
||||||
if (control)
|
|
||||||
{
|
{
|
||||||
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;
|
return control;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user