diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-05-08 12:08:01 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-05-08 16:28:41 +0200 |
commit | 60dcef1023c1f2b38ce3d5a9c8fa018651933b16 (patch) | |
tree | 3d14e0e434274f9020d1043411acd25a4555f6fe | |
parent | c3135bd43e216ef33bc554597c120388cf2babe1 (diff) |
writerfilter: fix crash in DomainMapper_Impl::handleIndex()
Crashreport signature:
program/libwriterfilterlo.so
writerfilter::dmapper::DomainMapper_Impl::handleIndex(tools::SvRef<writerfilter::dmapper::FieldContext> const&, rtl::OUString const&)
writerfilter/source/dmapper/DomainMapper_Impl.cxx:6116
program/libwriterfilterlo.so
writerfilter::dmapper::DomainMapper_Impl::CloseFieldCommand()
include/rtl/ustring.hxx:527
program/libwriterfilterlo.so
writerfilter::dmapper::DomainMapper::lcl_text(unsigned char const*, unsigned long)
writerfilter/source/dmapper/DomainMapper.cxx:3735
program/libwriterfilterlo.so
writerfilter::rtftok::RTFDocumentImpl::singleChar(unsigned char, bool)
writerfilter/source/rtftok/rtfdocumentimpl.hxx:718
Change-Id: I4e0f93ce50c8c9a1f9a1a0f9204bd4fee70cdde4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151502
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
(cherry picked from commit 1e75a434e349110990bcccd80b5c63c11080853e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151512
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 12c7e57f34a8..6616407836de 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -6638,7 +6638,10 @@ void DomainMapper_Impl::handleIndex { sValue = sValue.replaceAll("\"", ""); uno::Reference<text::XTextColumns> xTextColumns; - xTOC->getPropertyValue(getPropertyName( PROP_TEXT_COLUMNS )) >>= xTextColumns; + if (xTOC.is()) + { + xTOC->getPropertyValue(getPropertyName( PROP_TEXT_COLUMNS )) >>= xTextColumns; + } if (xTextColumns.is()) { xTextColumns->setColumnCount( sValue.toInt32() ); |