summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/source/core/stlpool.cxx5
-rw-r--r--svx/source/unodraw/unopool.cxx5
-rw-r--r--sw/source/core/unocore/SwXTextDefaults.cxx7
3 files changed, 13 insertions, 4 deletions
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index f4eee3948da8..a45bbaa706ed 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -1127,7 +1127,10 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
case HID_PSEUDOSHEET_SUBTITLE :
{
// Subtitle template
- SvxNumRule* pDefaultRule = static_cast<const SvxNumBulletItem*>( rSet.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET))->GetNumRule();
+ SvxNumBulletItem const*const pItem(
+ static_cast<const SvxNumBulletItem*>(
+ rSet.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET)));
+ SvxNumRule *const pDefaultRule = (pItem) ? pItem->GetNumRule() : nullptr;
DBG_ASSERT( pDefaultRule, "Where is my default template? [CL]" );
if(pDefaultRule)
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;
}
diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx
index 9955b4417c59..5c6e25683098 100644
--- a/sw/source/core/unocore/SwXTextDefaults.cxx
+++ b/sw/source/core/unocore/SwXTextDefaults.cxx
@@ -219,8 +219,11 @@ Any SAL_CALL SwXTextDefaults::getPropertyDefault( const OUString& rPropertyName
throw UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
Any aRet;
SfxItemPool& rSet (m_pDoc->GetAttrPool());
- const SfxPoolItem *pItem = rSet.GetPoolDefaultItem ( pMap->nWID );
- pItem->QueryValue( aRet, pMap->nMemberId );
+ SfxPoolItem const*const pItem = rSet.GetPoolDefaultItem(pMap->nWID);
+ if (pItem)
+ {
+ pItem->QueryValue( aRet, pMap->nMemberId );
+ }
return aRet;
}