diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-13 11:10:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-13 14:03:26 +0000 |
commit | 44d23b2c0ac9227e637229dc9845e269bc5a5905 (patch) | |
tree | dab65c628c27d4787b39e0be60ca72e23995773a | |
parent | df9cd33b545e59745352f21c71aa897debf1858c (diff) |
coverity#705508 Dereference null return value
Change-Id: Idbd70944ff637de32f5d2d11089efebe22692267
-rw-r--r-- | sw/source/core/unocore/unotbl.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 3721920f70a6..0d13a32870b7 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -3335,11 +3335,12 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) SwFrmFmt* pFmt = GetFrmFmt(); const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName); + + if (!pEntry) + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + if(pFmt) { - if (!pEntry) - throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); - if(0xFF == pEntry->nMemberId) { aRet = lcl_GetSpecialProperty(pFmt, pEntry ); |