Kaydet (Commit) 7cfd340e authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Fix crash & reduce nesting.

Change-Id: Ifbfe401cd69678c278394d190a37cc41a28d5c56
üst 3183f794
......@@ -484,12 +484,17 @@ void VCLXAccessibleToolBox::HandleSubToolBarEvent( const VclWindowEvent& rVclWin
void VCLXAccessibleToolBox::ReleaseSubToolBox( ToolBox* _pSubToolBox )
{
ToolBox* pToolBox = static_cast< ToolBox* >( GetWindow() );
if ( pToolBox )
{
if ( !pToolBox )
return;
sal_Int32 nIndex = pToolBox->GetItemPos( pToolBox->GetCurItemId() );
if ( nIndex == SAL_MAX_UINT16 )
return; // not found
Reference< XAccessible > xItem = getAccessibleChild( nIndex );
if ( xItem.is() )
{
if ( !xItem.is() )
return;
Reference< XAccessible > xChild = _pSubToolBox->GetAccessible();
VCLXAccessibleToolBoxItem* pItem =
static_cast< VCLXAccessibleToolBoxItem* >( xItem.get() );
......@@ -498,8 +503,6 @@ void VCLXAccessibleToolBox::ReleaseSubToolBox( ToolBox* _pSubToolBox )
pItem->SetChild( Reference< XAccessible >() );
pItem->NotifyChildEvent( xChild, false );
}
}
}
}
// -----------------------------------------------------------------------------
void VCLXAccessibleToolBox::FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment