summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-04-10 10:38:32 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2023-04-10 18:52:57 +0200
commitc5b3802cc1e2ced5326ca4d9d30045b84d58aea9 (patch)
tree82681bc6b13acd39631d4040d36f72edda2be0cb
parenttdf#154631: fix Export as gif ignores transparence of objects (diff)
downloadcore-c5b3802cc1e2ced5326ca4d9d30045b84d58aea9.tar.gz
core-c5b3802cc1e2ced5326ca4d9d30045b84d58aea9.zip
crashreporting: getUsedFontList() crash
e.g. https://crashreport.libreoffice.org/stats/crash_details/3a3c07aa-0f96-4efa-b55b-c3fe4e4b6ed8 ... Crash Reason EXCEPTION_ACCESS_VIOLATION_READ Crash Address 0x0 ... XMLFontAutoStylePool::getUsedFontList() xmloff\source\style\XMLFontAutoStylePool.cxx:334 XMLFontAutoStylePool::exportXML() xmloff\source\style\XMLFontAutoStylePool.cxx:408 Change-Id: I5d057b8e639260f6d00e731c3af7bab7203a8814 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150152 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--xmloff/source/style/XMLFontAutoStylePool.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index 0fbb57b78ec8..e86709b6cc3d 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -328,9 +328,9 @@ std::unordered_set<OUString> XMLFontAutoStylePool::getUsedFontList()
if (xStyle->isInUse())
{
uno::Reference<beans::XPropertySet> xPropertySet(xStyle, UNO_QUERY);
- if (xPropertySet.is())
+ uno::Reference<beans::XPropertySetInfo> xInfo(xPropertySet ? xPropertySet->getPropertySetInfo() : nullptr);
+ if (xInfo)
{
- uno::Reference<beans::XPropertySetInfo> xInfo(xPropertySet->getPropertySetInfo());
if (m_bEmbedLatinScript && xInfo->hasPropertyByName("CharFontName"))
{
OUString sCharFontName;