diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-07-15 18:38:38 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-07-15 18:38:38 +0200 |
commit | bcb1f81668d9b6a6d807ae32d60ccfce0b36ceb5 (patch) | |
tree | 24a0c2978e602cd72c2c8552162e9f1249b36c0d /svx | |
parent | 9fb8b3968670645b257982773ece9d9413f404c6 (diff) |
svx, sd, sw: GetPoolDefaultItem() can actually return nullptr
...if you call ResetPoolDefaultItem() first. Crash found by Varun Dhall.
Change-Id: I409484c172fb5843270aee2425844076a008b4df
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/unodraw/unopool.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index bc4f253e55f5..dccdbaded4b8 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -321,7 +321,10 @@ uno::Any SvxUnoDrawPool::_getPropertyDefault( const comphelper::PropertyMapEntry SfxItemPool* pPool = getModelPool( true ); const sal_uInt16 nWhich = pPool->GetWhich( (sal_uInt16)pEntry->mnHandle ); const SfxPoolItem *pItem = pPool->GetPoolDefaultItem ( nWhich ); - pItem->QueryValue( aAny, pEntry->mnMemberId ); + if (pItem) + { + pItem->QueryValue( aAny, pEntry->mnMemberId ); + } return aAny; } |