summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-07-15 18:38:38 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-07-23 18:55:55 +0000
commitf391964c8d2c234d0cdb68322a2abaa4d26a6442 (patch)
tree7055870862d99bf35f1e7bb7f549216caaf734ad /svx
parent9bde8bdab1024b24a71d56a4355a5eacca720007 (diff)
svx, sd, sw: GetPoolDefaultItem() can actually return nullptr
...if you call ResetPoolDefaultItem() first. Crash found by Varun Dhall. Change-Id: I409484c172fb5843270aee2425844076a008b4df (cherry picked from commit bcb1f81668d9b6a6d807ae32d60ccfce0b36ceb5) Reviewed-on: https://gerrit.libreoffice.org/17320 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/unodraw/unopool.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx
index 6d4320cc3380..1077ed415bbc 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;
}