diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-07-14 09:52:27 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-07-15 15:23:05 +0200 |
commit | d2c743b77fa58d1ae0ed2320803ce0ba4372741e (patch) | |
tree | ad9e5666a2369e040b05e6f21d9b7715c70dbdec | |
parent | 7e4c5ddaa6b750dd0b4472958b50134487e1d7ef (diff) |
cid#1448275 Dereference before null check
Change-Id: I2c647658c1f9213962e3392cc4206a6e9107e165
Reviewed-on: https://gerrit.libreoffice.org/75571
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index f5f474f05541..1a76791f8e3c 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -5359,10 +5359,10 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary const *pGloss) for( size_t nHintPos = 0; pHints && nHintPos < pHints->Count(); ++nHintPos) { const SwTextAttr *pHt = pHints->Get(nHintPos); + if (pHt->Which() != RES_TXTATR_FLYCNT) + continue; const sal_Int32 st = pHt->GetStart(); - if( pHt - && pHt->Which() == RES_TXTATR_FLYCNT - && (st >= (*ppBkmk)->GetMarkStart().nContent.GetIndex()) ) + if (st >= (*ppBkmk)->GetMarkStart().nContent.GetIndex()) { SwFrameFormat* pFrameFormat = pHt->GetFlyCnt().GetFrameFormat(); vecFrameFormat.push_back(pFrameFormat); |