sw/source/uibase/docvw/PostItMgr.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit fe20ed31704b60d850f8074a9ebf016d82452417 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Sun Sep 29 22:00:58 2024 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Oct 1 11:44:15 2024 +0200 tdf#158323: CRASH when switch back from HTML to Normal View... after edit in HTML code. bt: 0 rtl::Reference<SfxStyleSheetPool>::get (this=0xb8) at include/rtl/ref.hxx:205 1 0x00007f4361f3857c in SwDocStyleSheetPool::GetEEStyleSheetPool (this=0x0) at sw/inc/docstyle.hxx:236 2 0x00007f4362dcb8e2 in SwPostItMgr::SwPostItMgr (this=0x558439087f60, pView=0x5584387f7e80) at /home/julien/lo/libreoffice/sw/source/uibase/docvw/PostItMgr.cxx:229 3 0x00007f43630e6b14 in SwView::SwView (this=0x5584387f7e80, _rFrame=..., pOldSh=0x5584356fa360) at /home/julien/lo/libreoffice/sw/source/uibase/uiview/view.cxx:1003 4 0x00007f43632fee79 in SwWebView::SwWebView (this=0x5584387f7e80, _rFrame=..., _pShell=0x5584356fa360) at /home/julien/lo/libreoffice/sw/source/uibase/web/wview.cxx:85 5 0x00007f43632feb51 in SwWebView::CreateInstance (rFrame=..., pOldView=0x5584356fa360) at /home/julien/lo/libreoffice/sw/source/uibase/web/wview.cxx:67 6 0x00007f4393710655 in SfxViewFactory::CreateInstance (this=0x558434c3a090, rFrame=..., pOldSh=0x5584356fa360) at /home/julien/lo/libreoffice/sfx2/source/view/viewfac.cxx:26 7 0x00007f4393501e31 in SfxBaseModel::createViewController (this=0x558431de5a80, i_rViewName="Default", i_rArguments=empty uno::Sequence, i_rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x5584360bf520) at /home/julien/lo/libreoffice/sfx2/source/doc/sfxbasemodel.cxx:4334 8 0x00007f4393502a3f in non-virtual thunk to SfxBaseModel::createViewController(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) () at /home/julien/lo/libreoffice/instdir/program/libsfxlo.so 9 0x00007f43936b4ce4 in (anonymous namespace)::SfxFrameLoader_Impl::impl_createDocumentView (i_rModel=uno::Reference to (SwXTextDocument *) 0x558431de5b10, i_rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x5584360bf520, i_rViewFactoryArgs=..., i_rViewName="Default") at /home/julien/lo/libreoffice/sfx2/source/view/frmload.cxx:577 10 0x00007f43936b1f6c in (anonymous namespace)::SfxFrameLoader_Impl::load (this=0x558436633660, rArgs=uno::Sequence of length 18 = {...}, _rTargetFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x5584360bf520) at /home/julien/lo/libreoffice/sfx2/source/view/frmload.cxx:759 11 0x00007f439441ea51 in framework::LoadEnv::impl_loadContent (this=0x7ffdd69352c8) at /home/julien/lo/libreoffice/framework/source/loadenv/loadenv.cxx:1176 12 0x00007f439441b7d4 in framework::LoadEnv::start (this=0x7ffdd69352c8) at /home/julien/lo/libreoffice/framework/source/loadenv/loadenv.cxx:412 Regression from: https://git.libreoffice.org/core/+/d934aeace6e7049db3959421538ae382cb97b1d1%5E%21 tdf#103064 sw,editeng: make para styles work inside comments Change-Id: Ib9a1c9fe779ad14f93de0e1b3645beddb85e511d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174210 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Reviewed-by: Julien Nabet <serval2...@yahoo.fr> (cherry picked from commit c6cc724d8805215c7b5ad7b76cd167c6640e8e52) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174018 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit 06bf06c0341147688b8162e17fa70c1dec16885d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174322 diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 12c5e4f52d11..2a90c764ba59 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -225,7 +225,9 @@ SwPostItMgr::SwPostItMgr(SwView* pView) StartListening(*mpView->GetDocShell()); // listen to stylesheet pool to update on stylesheet rename, // as EditTextObject references styles by name. - StartListening(*static_cast<SwDocStyleSheetPool*>(mpView->GetDocShell()->GetStyleSheetPool())->GetEEStyleSheetPool()); + SfxStyleSheetBasePool* pStyleSheetPool = mpView->GetDocShell()->GetStyleSheetPool(); + if (pStyleSheetPool) + StartListening(*static_cast<SwDocStyleSheetPool*>(pStyleSheetPool)->GetEEStyleSheetPool()); if (!mvPostItFields.empty()) { mbWaitingForCalcRects = true;