summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-05-23 10:08:08 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2022-06-01 19:01:29 +0200
commit33e1d55aba6b6f91c056de7ed6c9aff2832782bf (patch)
tree911c77173b277c238397d29c7061aa81b7a91c9c
parent53765732330043effb197529e759e21fca93ae1b (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" Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134758 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit c8d4ae2ad0cfdac770d897e7aca72fbb4a87765f, plus follow-up f546767b4e9bf3de288ea50336cf1e15f1ee7435 "tdf#149198 Fix previous fix") Change-Id: Iad4d1576ed651a74c0f8b2e8dee3c59f5214accd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134780 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 6f6d61ea5d7700fb18bfb49c6e1d16a55944e581) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134784 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 6f8a24acd255..a6da6244898a 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3064,7 +3064,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);