framework/source/uielement/controlmenucontroller.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 394dcb830c9d7bfe3a454589847be0fd5024dc86
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Feb 27 16:42:41 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Feb 28 06:27:57 2023 +0000

    tdf#153857 Writer hangs right-clicking on form field
    
    regression from
        commit 5032262fccd0ef7f274323ae481b3230ffd42d3a
        Author: Noel Grandin <noel.gran...@collabora.co.uk>
        Date:   Tue Feb 21 15:05:37 2023 +0200
        BaseMutex->std::mutex in PopupMenuControllerBase
    
    Change-Id: I01bdab09ac0ce1d9b35ed45ad36d1c5179702c6c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147920
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/framework/source/uielement/controlmenucontroller.cxx 
b/framework/source/uielement/controlmenucontroller.cxx
index b990e725d507..afbf3ec9258d 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -302,8 +302,10 @@ void SAL_CALL ControlMenuController::updatePopupMenu()
         Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch( 
aTargetURL, OUString(), 0 );
         if ( xDispatch.is() )
         {
+            aLock.unlock(); // the addStatusListener will call back into 
::statusChanged
             xDispatch->addStatusListener( static_cast< XStatusListener* 
>(this), aTargetURL );
             xDispatch->removeStatusListener( static_cast< XStatusListener* 
>(this), aTargetURL );
+            aLock.lock();
             m_aURLToDispatchMap.emplace( aTargetURL.Complete, xDispatch );
         }
     }

Reply via email to