sw/source/core/unocore/unoport.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit ab09eceb3f5eae6a3e6eeb39d99739684e20363b Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Wed Nov 23 20:29:42 2022 +0100 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Wed Nov 23 21:33:33 2022 +0100 tdf#152187: CRASH when opening Properties tab of Text Portion in UNO Inspector relevant part of bt: 5 0x00007fa6fa5cdc0b in std::_Optional_base_impl<com::sun::star::uno::Any, std::_Optional_base<com::sun::star::uno::Any, false, false> >::_M_get() const (this=0x558f064c4508) at /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/optional:484 6 0x00007fa6fa5ccf95 in std::optional<com::sun::star::uno::Any>::operator*() const & (this=0x558f064c4508) at /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/optional:970 7 0x00007fa6fa5c8c3c in SwXTextPortion::GetPropertyValue(com::sun::star::uno::Any&, SfxItemPropertyMapEntry const&, SwUnoCursor*, std::unique_ptr<SfxItemSet, std::default_delete<SfxItemSet> >&) (this=0x558f064c43d0, rVal=uno::Any(void), rEntry=..., pUnoCursor=0x558f06515600, pSet=std::unique_ptr<SfxItemSet> = {...}) at sw/source/core/unocore/unoport.cxx:373 8 0x00007fa6fa5c90e8 in SwXTextPortion::GetPropertyValues_Impl(com::sun::star::uno::Sequence<rtl::OUString> const&) (this=0x558f064c43d0, rPropertyNames=uno::Sequence of length 1 = {...}) at sw/source/core/unocore/unoport.cxx:414 9 0x00007fa6fa5c925f in SwXTextPortion::getPropertyValue(rtl::OUString const&) (this=0x558f064c43d0, rPropertyName="RubyAdjust") at sw/source/core/unocore/unoport.cxx:425 10 0x00007fa6fa5c940f in non-virtual thunk to SwXTextPortion::getPropertyValue(rtl::OUString const&) () at /home/julien/lo/libreoffice/instdir/program/../program/libswlo.so Regression from d57ad60d8ed5279a3366386553c5cefb7ae8b5bf "unique_ptr->optional in SwXTextPortion" (in August 2022) Change-Id: I9c4c5bbbcb439cb3105654044dd8a571d39ff513 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143191 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index 7a78c14f7ee1..f00bb78c9780 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -369,7 +369,7 @@ void SwXTextPortion::GetPropertyValue( case MID_RUBY_ABOVE : pToSet = &m_oRubyIsAbove;break; case MID_RUBY_POSITION: pToSet = &m_oRubyPosition;break; } - if(pToSet) + if(pToSet && *pToSet) rVal = **pToSet; } break;