diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-06-18 16:37:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-06-18 16:37:23 +0100 |
commit | a7e7d057a4a574b337f3df6e9a600aac918be09c (patch) | |
tree | dfe98a041b88c2f6f5531fd6136d5ea6dd211181 /cui | |
parent | babe536ec227c04d10e55cd780e7021bf905aa82 (diff) |
coverity#1307697 Dereference null return value
Change-Id: I48bf70689153b83bd1da7ff1553a4a3ec823d1b2
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 8d731f309771..8e21658aaef1 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -712,13 +712,18 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) if ( !bIsLink && !bIsGraphicValid ) bIsGraphicValid = LoadLinkedGraphic_Impl(); - if ( eNewPos != eOldPos - || bIsLink != bWasLink - || ( bWasLink && rOldItem.GetGraphicLink() - != aBgdGraphicPath ) - || ( !bWasLink && rOldItem.GetGraphic()->GetBitmap() - != aBgdGraphic.GetBitmap() ) - ) + bool bModifyBrush = false; + if (eNewPos != eOldPos || bIsLink != bWasLink) + bModifyBrush = true; + else if (bWasLink && rOldItem.GetGraphicLink() != aBgdGraphicPath) + bModifyBrush = true; + else if (!bWasLink) + { + const Graphic* pGraphic = rOldItem.GetGraphic(); + if (pGraphic) + bModifyBrush = pGraphic->GetBitmap() != aBgdGraphic.GetBitmap(); + } + if (bModifyBrush) { bModified = true; |