summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/htmltab.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-12-18 20:37:33 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-12-19 10:09:36 +0100
commite867b393ef95cb9bec7f68787771dfa329b00bea (patch)
tree0cb15ef071d4a44361929927faaa4c15317e28ad /sw/source/filter/html/htmltab.cxx
parent386a73e0b76032b4992829bfdf9965854351b230 (diff)
ofz: Null-deref
Change-Id: I9992191fe5b4cfd771cc36a61d0ebaa8a9e6e9db Reviewed-on: https://gerrit.libreoffice.org/46743 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/filter/html/htmltab.cxx')
-rw-r--r--sw/source/filter/html/htmltab.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 1361c574fcea..3a49139fc00e 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -3597,11 +3597,11 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
}
SwNode const*const pNd = & m_pPam->GetPoint()->nNode.GetNode();
- if( !bAppended && !bForceFrame )
+ SwTextNode *const pOldTextNd = (!bAppended && !bForceFrame) ?
+ pSavePos->nNode.GetNode().GetTextNode() : nullptr;
+
+ if (pOldTextNd)
{
- SwTextNode *const pOldTextNd =
- pSavePos->nNode.GetNode().GetTextNode();
- OSL_ENSURE( pOldTextNd, "Why we aren't in a text node?" );
SwFrameFormat *pFrameFormat = pSwTable->GetFrameFormat();
const SfxPoolItem* pItem2;