sw/source/uibase/app/docst.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 921f9bf2d4cd269e74db21a50e008e210afb3870 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Jan 16 15:59:14 2025 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Thu Jan 23 10:45:32 2025 +0100 crashtesting: Find might return nullptr Since commit 7a35f3dc7419d833b8f47069c4df63e900ccb880 Author: László Németh <nem...@numbertext.org> Date: Fri Oct 25 00:38:35 2024 +0200 tdf#48459 sw inline heading: apply it on the selected words Seen in https://crashreport.libreoffice.org/stats/crash_details/5629bae3-8c43-4864-8758-4887b00a892d Change-Id: I125304700b4e2fcc4ecc52eb7eaecea049cbb5ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180356 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> (cherry picked from commit 51e4b6b126dc90e0725b9a94dfca8ee87f3e2d3b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180363 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Tested-by: Michael Stahl <michael.st...@allotropia.de> Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index c9b9a74d730c..1fe54effc43b 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -1210,7 +1210,9 @@ bool SwDocShell::MakeInlineHeading(SwWrtShell *pSh, SwTextFormatColl* pColl, con // use the associated borderless frame style "Inline Heading" SwDocStyleSheet* pStyle2 = static_cast<SwDocStyleSheet*>( m_xBasePool->Find( "Inline Heading", SfxStyleFamily::Frame)); - pSh->SetFrameFormat( pStyle2->GetFrameFormat() ); + SAL_WARN_IF( !pStyle2, "sw.ui", "Style not found" ); + if(pStyle2) + pSh->SetFrameFormat( pStyle2->GetFrameFormat() ); // select the text content of the frame, and apply the paragraph style pSh->UnSelectFrame();