[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Wed Dec 20 12:50:29 UTC 2017


 sw/source/filter/html/htmltab.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 30b6545eb626a8ae91a0d3dd9f50b93efd180475
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 20 10:09:21 2017 +0000

    ofz: Null-deref
    
    Change-Id: I42a0fc6d73caaffd3fe183805dde449c09243cf9
    Reviewed-on: https://gerrit.libreoffice.org/46836
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index f1a869b55b14..0f5f5ae162b1 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -3606,10 +3606,9 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
                 SwTextNode *const pOldTextNd = (!bAppended && !bForceFrame) ?
                     pSavePos->nNode.GetNode().GetTextNode() : nullptr;
 
-                if (pOldTextNd)
+                SwFrameFormat *pFrameFormat = (pOldTextNd && pSwTable) ? pSwTable->GetFrameFormat() : nullptr;
+                if (pFrameFormat)
                 {
-                    SwFrameFormat *pFrameFormat = pSwTable->GetFrameFormat();
-
                     const SfxPoolItem* pItem2;
                     if( SfxItemState::SET == pOldTextNd->GetSwAttrSet()
                             .GetItemState( RES_PAGEDESC, false, &pItem2 ) &&


More information about the Libreoffice-commits mailing list