coverity#441203 Dereference after null check

Change-Id: I166e9ab8d3693568cc2b6a0ecd7d49532508116b
This commit is contained in:
Caolán McNamara 2014-02-22 20:59:00 +00:00
parent 841ea0ace7
commit c4a766db25

View File

@ -286,17 +286,19 @@ OUString SAL_CALL ValueSetAcc::getAccessibleName()
const SolarMutexGuard aSolarGuard; const SolarMutexGuard aSolarGuard;
OUString aRet; OUString aRet;
if ( mpParent ) if (mpParent)
{
aRet = mpParent->GetAccessibleName(); aRet = mpParent->GetAccessibleName();
if ( aRet.isEmpty() ) if ( aRet.isEmpty() )
{ {
Window* pLabel = mpParent->GetAccessibleRelationLabeledBy(); Window* pLabel = mpParent->GetAccessibleRelationLabeledBy();
if ( pLabel && pLabel != mpParent ) if ( pLabel && pLabel != mpParent )
aRet = OutputDevice::GetNonMnemonicString( pLabel->GetText() ); aRet = OutputDevice::GetNonMnemonicString( pLabel->GetText() );
if (aRet.isEmpty()) if (aRet.isEmpty())
aRet = mpParent->GetQuickHelpText(); aRet = mpParent->GetQuickHelpText();
}
} }
return aRet; return aRet;