summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-06-03 10:56:44 +0200
committerLuboš Luňák <l.lunak@collabora.com>2022-06-06 09:48:20 +0200
commitd6752e02e3870875ced86adc04aae8e36a12cf0c (patch)
treee7bc046e03dcfa003dbff493693d99c935993819 /sfx2/source
parent48646ab6d71db8ffa2aae9f54f515d413249809c (diff)
make SfxStateCache::xDispatch up to date before using it
When e.g. having one image selected and then double-clicking on the other one Execute_Impl() gets called with SfxStateCache still having bSlotDirt and mxDispatch out of date. I originally tried to make all mxDispatch accesses first ensure !bSlotDirty, but then unit tests started failing with hard-to-debug crashes because GetSlotServer() also sets bCtrlDirty, which leads SfxBindings to handle that in idle timers. So at least handle this case, where it really is necessary. Change-Id: I4ec5908bc955c562e14cd813e269536924ce6f2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135344 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/control/bindings.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 7b8b7283b415..4ea06231562a 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -898,9 +898,9 @@ const SfxPoolItem* SfxBindings::Execute_Impl( sal_uInt16 nId, const SfxPoolItem*
// slot is uncached, use SlotCache to handle external dispatch providers
xCache.reset(new SfxStateCache(nId));
pCache = xCache.get();
- pCache->GetSlotServer( rDispatcher, pImpl->xProv );
}
+ pCache->GetSlotServer( rDispatcher, pImpl->xProv ); // make pCache->GetDispatch() up to date
if ( pCache->GetDispatch().is() )
{
DBG_ASSERT( !ppInternalArgs, "Internal args get lost when dispatched!" );