sfx2/source/control/bindings.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 32e0d2525ff2c108f15c413480e28e10b5978352
Author:     Samuel Mehrbrodt <[email protected]>
AuthorDate: Mon Feb 23 15:04:53 2026 +0100
Commit:     Samuel Mehrbrodt <[email protected]>
CommitDate: Mon Mar 9 13:04:46 2026 +0100

    Fix DBG_ASSERT logic
    
    cache is only used for non-master commands
    
    This fixes warnings like:
      warn:legacy.tools:1611319:1611319:sfx2/source/control/bindings.cxx:1755: 
No cache for OfficeDispatch!
    
    Change-Id: I9d7583b55481177a15b22317b45316724c0e5e95
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200059
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <[email protected]>
    (cherry picked from commit 75094fbffa3e90b8e32d148f63b6fb9ebd2e3b28)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201261
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 0d78ff1eb741..08e69ed03779 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1757,7 +1757,7 @@ uno::Reference < frame::XDispatch > 
SfxBindings::GetDispatch( const SfxSlot* pSl
         if ( !pCache )
             pCache = GetStateCache( pSlot->nSlotId );
 
-        DBG_ASSERT( pCache, "No cache for OfficeDispatch!" );
+        DBG_ASSERT( bMasterCommand || pCache, "No cache for OfficeDispatch!" );
         if ( pCache && !bMasterCommand )
             pCache->SetInternalDispatch( xRet );
     }

Reply via email to