summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-14 09:54:40 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-15 15:36:45 +0200
commit50c1032b4d292c26015d102a1aede03a9ed8e555 (patch)
treee10f4cf729b9072ed7a5eb1383038decb19af178 /sc/source/filter
parent71a7666863b69156de4dd10c8567f97460ea5abc (diff)
cid#1448276 Dereference null return value
Change-Id: I1f11115b730cb51d0aa59b99e15b5dacff4cd68e Reviewed-on: https://gerrit.libreoffice.org/75572 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/html/htmlexp.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 3e5acc29a43d..80c32814fac0 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -1060,10 +1060,9 @@ void ScHTMLExport::WriteCell( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol, SC
TAG_ON(aStrTD.makeStringAndClear().getStr());
//write the note for this as the first thing in the tag
- if (pDoc->HasNote(aPos))
+ ScPostIt* pNote = pDoc->HasNote(aPos) ? pDoc->GetNote(aPos) : nullptr;
+ if (pNote)
{
- ScPostIt* pNote = pDoc->GetNote(aPos);
-
//create the comment indicator
OStringBuffer aStr(OOO_STRING_SVTOOLS_HTML_anchor);
aStr.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_class)