summaryrefslogtreecommitdiffstats
path: root/sfx2/source/control/dispatch.cxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 11:47:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 11:47:06 +0000
commit8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59 (patch)
treeca2b0cc4fba88107f5f6e740285184a061011866 /sfx2/source/control/dispatch.cxx
parentAdding debian version 4:24.2.3-2. (diff)
downloadlibreoffice-8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59.tar.xz
libreoffice-8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59.zip
Merging upstream version 4:24.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sfx2/source/control/dispatch.cxx')
-rw-r--r--sfx2/source/control/dispatch.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index fe7271677f..bedad9a624 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -707,7 +707,7 @@ bool SfxDispatcher::GetShellAndSlot_Impl(sal_uInt16 nSlot, SfxShell** ppShell,
*ppShell = GetShell(aSvr.GetShellLevel());
*ppSlot = aSvr.GetSlot();
- if ( nullptr == (*ppSlot)->GetExecFnc() && bRealSlot )
+ if ( nullptr == (*ppSlot)->GetExecFnc() && bRealSlot && *ppShell )
*ppSlot = (*ppShell)->GetInterface()->GetRealSlot(*ppSlot);
// Check only real slots as enum slots don't have an execute function!
return !bRealSlot || ((nullptr != *ppSlot) && (nullptr != (*ppSlot)->GetExecFnc()) );
@@ -986,13 +986,15 @@ void SfxDispatcher::PostMsgHandler(std::unique_ptr<SfxRequest> pReq)
SfxSlotServer aSvr;
if ( FindServer_(pReq->GetSlot(), aSvr ) ) // HACK(x), whatever that was supposed to mean
{
- const SfxSlot *pSlot = aSvr.GetSlot();
- SfxShell *pSh = GetShell(aSvr.GetShellLevel());
+ if (SfxShell *pSh = GetShell(aSvr.GetShellLevel()))
+ {
+ const SfxSlot *pSlot = aSvr.GetSlot();
- // When the pSlot is a "Pseudoslot" for macros or Verbs, it can
- // be destroyed in the Call_Impl, thus do not use it anymore!
- pReq->SetSynchronCall( false );
- Call_Impl( *pSh, *pSlot, *pReq, pReq->AllowsRecording() ); //! why bRecord?
+ // When the pSlot is a "Pseudoslot" for macros or Verbs, it can
+ // be destroyed in the Call_Impl, thus do not use it anymore!
+ pReq->SetSynchronCall( false );
+ Call_Impl( *pSh, *pSlot, *pReq, pReq->AllowsRecording() ); //! why bRecord?
+ }
}
}
else