summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-04-16 16:21:26 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-04-19 20:37:02 +0200
commita1ecf71fd7d3a011419a110e6e85bd0d32492f75 (patch)
tree8100b0055abf1f30e0895b96a371ff5691763cfc
parentc656b1048f0efbbe36c78de357dd03845c38177c (diff)
svx: fix crash in DefaultProperties::dumpAsXml()
mpItemSet can be null Change-Id: I4192f84639116c550bba5303a5fc70528cb3e8c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114263 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 832b23d9376019619929764606276aacde1e329a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114273 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--svx/source/sdr/properties/defaultproperties.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/svx/source/sdr/properties/defaultproperties.cxx b/svx/source/sdr/properties/defaultproperties.cxx
index 587e9a652454..fa5e2beba858 100644
--- a/svx/source/sdr/properties/defaultproperties.cxx
+++ b/svx/source/sdr/properties/defaultproperties.cxx
@@ -246,7 +246,10 @@ namespace sdr::properties
{
xmlTextWriterStartElement(pWriter, BAD_CAST("DefaultProperties"));
BaseProperties::dumpAsXml(pWriter);
- mpItemSet->dumpAsXml(pWriter);
+ if (mpItemSet)
+ {
+ mpItemSet->dumpAsXml(pWriter);
+ }
xmlTextWriterEndElement(pWriter);
}
} // end of namespace