diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-07 16:01:25 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-07 16:15:16 +0100 |
commit | 660d761bfeea81c0b76cf08b4c961a2ad8d09a06 (patch) | |
tree | fbf6c2a1280b94f8b3f129e488e0d73fa7d3014b /writerfilter/source | |
parent | 1b20921ae00609fd4a2cd5a5241083b886a45346 (diff) |
fdo#70812 writerfilter: check for nullptr after dynamic_cast
Happens when we set "no number" in the default para style, which is
already the case for Writer anyway.
Change-Id: I3b262e633e52e4aae039c55d6edb744e36f0f354
Diffstat (limited to 'writerfilter/source')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index d2474bbc849c..8a3f58976f5c 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1635,7 +1635,8 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType { //style sheets cannot have a numbering rule attached StyleSheetPropertyMap* pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() ); - pStyleSheetPropertyMap->SetListLevel( (sal_Int16)nIntValue ); + if (pStyleSheetPropertyMap) + pStyleSheetPropertyMap->SetListLevel( (sal_Int16)nIntValue ); } else rContext->Insert( PROP_NUMBERING_LEVEL, uno::makeAny( (sal_Int16)nIntValue )); @@ -1649,7 +1650,8 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType { //style sheets cannot have a numbering rule attached StyleSheetPropertyMap* pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() ); - pStyleSheetPropertyMap->SetListId( nIntValue ); + if (pStyleSheetPropertyMap) + pStyleSheetPropertyMap->SetListId( nIntValue ); } if( pList.get( ) ) { @@ -1667,7 +1669,8 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType { // set the number id for AbstractNum references StyleSheetPropertyMap* pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() ); - pStyleSheetPropertyMap->SetNumId( nIntValue ); + if (pStyleSheetPropertyMap) + pStyleSheetPropertyMap->SetNumId( nIntValue ); } else { |