summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-09-01 09:12:10 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-09-01 09:40:20 +0100
commitcefbbd5c325b57688c3b43883a6ad9c3e6809815 (patch)
treec9bb8a333396fe3864d9c5b72a0d3cfcd1df79e4 /filter
parent239c25ff95b665717e87f3e4cf5aa6c29e4deb72 (diff)
coverity#1321600 Dereference before null check
Change-Id: I5a2e61200333ca57af990d3d7be3899da836472a
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/svdfppt.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 561ac508d576..679759f4022d 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2559,24 +2559,20 @@ bool SdrPowerPointImport::GetColorFromPalette( sal_uInt16 nNum, Color& rColor )
}
if ( pMasterPersist )
{
- while( ( pMasterPersist && pMasterPersist->aSlideAtom.nFlags & 2 ) // it is possible that a masterpage
- && pMasterPersist->aSlideAtom.nMasterId ) // itself is following a master colorscheme
+ while( (pMasterPersist->aSlideAtom.nFlags & 2) // it is possible that a masterpage
+ && pMasterPersist->aSlideAtom.nMasterId ) // itself is following a master colorscheme
{
auto nOrigMasterId = pMasterPersist->aSlideAtom.nMasterId;
sal_uInt16 nNextMaster = m_pMasterPages->FindPage(nOrigMasterId);
- if ( nNextMaster == PPTSLIDEPERSIST_ENTRY_NOTFOUND )
+ if (nNextMaster == PPTSLIDEPERSIST_ENTRY_NOTFOUND)
break;
- else
- pMasterPersist = &(*pPageList2)[ nNextMaster ];
+ pMasterPersist = &(*pPageList2)[ nNextMaster ];
if (pMasterPersist->aSlideAtom.nMasterId == nOrigMasterId)
{
SAL_WARN("filter.ms", "loop in atom chain");
break;
}
}
- }
- if ( pMasterPersist )
- {
const_cast<SdrPowerPointImport*>(this)->aPageColors = pMasterPersist->aColorScheme;
}
}