diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-28 10:38:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-28 13:14:01 +0000 |
commit | da0581b32c8b93bbdd4abc14e30010bab7873336 (patch) | |
tree | b2aa790f07127bca1677135ebeb91d067074e0ab /sw | |
parent | 2c345da3725dcd73704fdc990e57fc7aa9a7f99e (diff) |
coverity#705507 Dereference null return value
Change-Id: I766d6c98371392a75c7d1097b7a3516a43d3fbe4
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unoport.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index 03e853fa8b7a..c492eb02c309 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -670,7 +670,9 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion: } else { - const SfxItemPropertySimpleEntry* pEntry = rPropMap.getByName( pProp[i] ); + const SfxItemPropertySimpleEntry* pEntry = rPropMap.getByName( pProp[i] ); + if (!pEntry) + throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pProp[i], static_cast < cppu::OWeakObject * > ( this ) ); aResult.State = pPropertyStates[i]; aResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_FAILURE; |