summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-12-26 21:00:35 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-12-26 21:05:44 +0000
commitf03ad9ee3458c76db21c10e18bdb49d27f7be1c3 (patch)
treebe1260eab06ce2b40c79d96db37a23f8ff1c959e
parent54596087e57ea533253e19eea594d9b6c06e8d26 (diff)
ofz#4796 Null-dereference
Change-Id: Iad537d2bb2bed1225e5647a918c923e6d95aea75
-rw-r--r--sw/source/filter/html/htmltab.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 33c7de3e6fe3..6d3c6e50894f 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -4772,8 +4772,11 @@ void SwHTMLParser::BuildTableCaption( HTMLTable *pCurTable )
// If there's an adjustment for the cell, we need to close it
std::unique_ptr<HTMLAttrContext> xCntxt(PopContext());
- EndContext(xCntxt.get());
- xCntxt.reset();
+ if (xCntxt)
+ {
+ EndContext(xCntxt.get());
+ xCntxt.reset();
+ }
SetAttr( false );