diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2021-04-27 19:22:52 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-04-28 10:51:19 +0200 |
commit | c06f05e28cb66bd2aac5ea65bcfa3732808c51c6 (patch) | |
tree | 5ac03bd29d7d81adad2c101b8929a39d180882b6 /svl/source | |
parent | d12acfa1405fa5b7c11d2a517286da68b3fd2eff (diff) |
svl: fix crash in SfxItemSet::dumpAsXml()
Change-Id: I64cb14a740d6874ce288f249953984116648a470
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114759
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/items/itemset.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index dea82de88d64..b234543a28f4 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -1531,7 +1531,17 @@ void SfxItemSet::dumpAsXml(xmlTextWriterPtr pWriter) const (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SfxItemSet")); SfxItemIter aIter(*this); for (const SfxPoolItem* pItem = aIter.GetCurItem(); pItem; pItem = aIter.NextItem()) - pItem->dumpAsXml(pWriter); + { + if (IsInvalidItem(pItem)) + { + (void)xmlTextWriterStartElement(pWriter, BAD_CAST("invalid")); + (void)xmlTextWriterEndElement(pWriter); + } + else + { + pItem->dumpAsXml(pWriter); + } + } (void)xmlTextWriterEndElement(pWriter); } |