sfx2/source/doc/objmisc.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 6dbb577716acfcc909d4368109c5d95853bccb4d Author: Miklos Vajna <[email protected]> AuthorDate: Thu Jan 29 09:54:57 2026 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Fri Jan 30 10:47:10 2026 +0100 sfx2: fix crash in SfxObjectShell::PostActivateEvent_Impl() gdb backtrace on the core file from the crashreport: #0 0x00007078323c6c4e in std::__shared_ptr<SfxItemSet, (__gnu_cxx::_Lock_policy)2>::operator bool (this=<optimized out>) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/shared_ptr_base.h:1670 #1 SfxMedium::GetItemSet (this=0x0) at sfx2/source/doc/docfile.cxx:3840 #2 0x0000707832428792 in SfxObjectShell::PostActivateEvent_Impl (this=0x3e357de0, pFrame=pFrame@entry=0x427b7460) at sfx2/source/doc/objmisc.cxx:933 #3 0x0000707832214661 in SfxApplication::SetViewFrame_Impl (this=0x3c0a39d0, pFrame=pFrame@entry=0x427b7460) at sfx2/source/appl/app.cxx:273 #4 0x000070783254804f in SfxViewFrame::SetViewFrame (pFrame=0x427b7460) at sfx2/source/view/viewfrm.cxx:3735 and: #2 0x0000707832428792 in SfxObjectShell::PostActivateEvent_Impl (this=0x3e357de0, pFrame=pFrame@entry=0x427b7460) at sfx2/source/doc/objmisc.cxx:933 933 const SfxBoolItem* pHiddenItem = pMedium->GetItemSet().GetItem(SID_HIDDEN, false); (gdb) print pMedium $1 = (SfxMedium *) 0x0 Assume that no medium means the same as medium having no hiddem item. Change-Id: I6295cfd90d2a3d529fa5e915983578e6768a2244 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198357 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins (cherry picked from commit 01d66be56971875a690f3e698093492e39485efa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198403 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index a0296194e807..c41a9ba29ec7 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -930,7 +930,7 @@ void SfxObjectShell::PostActivateEvent_Impl( SfxViewFrame const * pFrame ) if ( pSfxApp->IsDowning() || IsLoading() || !pFrame || pFrame->GetFrame().IsClosing_Impl() ) return; - const SfxBoolItem* pHiddenItem = pMedium->GetItemSet().GetItem(SID_HIDDEN, false); + const SfxBoolItem* pHiddenItem = pMedium ? pMedium->GetItemSet().GetItem(SID_HIDDEN, false) : nullptr; if ( !pHiddenItem || !pHiddenItem->GetValue() ) { SfxEventHintId nId = pImpl->nEventId;
