sw/source/filter/html/htmltab.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit f2e0c18cd44fff1e1b79924f582ced400fb00dad Author: Caolán McNamara <caol...@redhat.com> Date: Fri Dec 22 21:33:52 2017 +0000 ofz#4728 Null-deref Change-Id: Ide91a63424f864e2913b8268c4eca7961ba54572 Reviewed-on: https://gerrit.libreoffice.org/47000 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 723d9544d21d..80ddf65f2303 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -3585,6 +3585,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, const SwTable* pSwTable = m_xDoc->InsertTable( SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 1 ), *m_pPam->GetPoint(), 1, 1, text::HoriOrientation::LEFT ); + SwFrameFormat *pFrameFormat = pSwTable ? pSwTable->GetFrameFormat() : nullptr; if( bForceFrame ) { @@ -3594,10 +3595,10 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, } else { - if( bStyleParsed ) + if (bStyleParsed && pFrameFormat) { m_pCSS1Parser->SetFormatBreak( aItemSet, aPropInfo ); - pSwTable->GetFrameFormat()->SetFormatAttr( aItemSet ); + pFrameFormat->SetFormatAttr( aItemSet ); } m_pPam->Move( fnMoveBackward ); } @@ -3606,8 +3607,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, SwTextNode *const pOldTextNd = (!bAppended && !bForceFrame) ? pSavePos->nNode.GetNode().GetTextNode() : nullptr; - SwFrameFormat *pFrameFormat = (pOldTextNd && pSwTable) ? pSwTable->GetFrameFormat() : nullptr; - if (pFrameFormat) + if (pFrameFormat && pOldTextNd) { const SfxPoolItem* pItem2; if( SfxItemState::SET == pOldTextNd->GetSwAttrSet()
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits