vcl/qt5/QtInstance.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 324e2a5c3e6355e6b38db0add100465224841364
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Nov 5 14:00:31 2021 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Nov 5 16:17:45 2021 +0100

    tdf#144994 QtInstance::CreateMenu needs SolarMutex
    
    It can be called from extensions (as is the case e.g.
    for LanguageTool, s. tdf#144994 comment 19; assertion
    is hit after clicking around in the menu a bit) and
    'RunInMainThread' requires that the SolarMutex
    is held.
    
    Change-Id: I282ef6a21e60b636abb27aeba332ae3a634ce680
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124750
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/qt5/QtInstance.cxx b/vcl/qt5/QtInstance.cxx
index 06840ad7281f..29a7d0e4ddf7 100644
--- a/vcl/qt5/QtInstance.cxx
+++ b/vcl/qt5/QtInstance.cxx
@@ -358,6 +358,7 @@ QtInstance::CreateVirtualDevice(SalGraphics& rGraphics, 
tools::Long& nDX, tools:
 
 std::unique_ptr<SalMenu> QtInstance::CreateMenu(bool bMenuBar, Menu* pVCLMenu)
 {
+    SolarMutexGuard aGuard;
     std::unique_ptr<SalMenu> pRet;
     RunInMainThread([&pRet, bMenuBar, pVCLMenu]() {
         QtMenu* pSalMenu = new QtMenu(bMenuBar);

Reply via email to