diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-05-23 10:08:08 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-05-23 12:00:23 +0200 |
commit | c8d4ae2ad0cfdac770d897e7aca72fbb4a87765f (patch) | |
tree | b848277aa476066d911b7d6370efbf4d5c608199 /sw | |
parent | 8d00d5f36454e202586df4e2dafb12c7195b7a1f (diff) |
tdf#149198 Fix use of nullptr
...which would have caused std::abort for non-production debug builds since
4f0c70fb5554325e0cc2129741175bf07de22029 "Avoid calling OString ctor with null
pointer", and started to erroneously pass a nullptr argument into a
std::string_view for all kinds of builds with
af16aa625682b649e8843237652b9246d519cbae "Improve loplugin:stringview"
Change-Id: Iad4d1576ed651a74c0f8b2e8dee3c59f5214accd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134758
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 40ad41934480..4294f841cbd5 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3136,7 +3136,7 @@ void DocxAttributeOutput::WriteCollectedRunProperties() { const char* pVal = nullptr; m_pColorAttrList->getAsChar(FSNS(XML_w, XML_val), pVal); - if (std::string_view("auto") != pVal) + if (pVal != nullptr && std::string_view("auto") != pVal) { m_pSerializer->startElementNS(XML_w14, XML_textFill); m_pSerializer->startElementNS(XML_w14, XML_solidFill); |