From c4a766db25f0f11a19dc552de6a91f4e1404229f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sat, 22 Feb 2014 20:59:00 +0000 Subject: [PATCH] coverity#441203 Dereference after null check Change-Id: I166e9ab8d3693568cc2b6a0ecd7d49532508116b --- svtools/source/control/valueacc.cxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index e5a7a98e4faf..098ee4b58fb6 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -286,17 +286,19 @@ OUString SAL_CALL ValueSetAcc::getAccessibleName() const SolarMutexGuard aSolarGuard; OUString aRet; - if ( mpParent ) + if (mpParent) + { aRet = mpParent->GetAccessibleName(); - if ( aRet.isEmpty() ) - { - Window* pLabel = mpParent->GetAccessibleRelationLabeledBy(); - if ( pLabel && pLabel != mpParent ) - aRet = OutputDevice::GetNonMnemonicString( pLabel->GetText() ); + if ( aRet.isEmpty() ) + { + Window* pLabel = mpParent->GetAccessibleRelationLabeledBy(); + if ( pLabel && pLabel != mpParent ) + aRet = OutputDevice::GetNonMnemonicString( pLabel->GetText() ); - if (aRet.isEmpty()) - aRet = mpParent->GetQuickHelpText(); + if (aRet.isEmpty()) + aRet = mpParent->GetQuickHelpText(); + } } return aRet;