sw/source/uibase/utlui/content.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 575a713aae2beb4402ea9c41802311966329b8ea
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Thu Feb 1 11:46:53 2024 +0600
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu Feb 1 11:22:17 2024 +0100

    tdf#159493: hold solar mutex in TimerUpdate
    
    Several functions called from here check that the mutex is
    held, specifically:
    
    === call stack 1 ===
    
      tllo.dll!DbgTestSolarMutex()
            at C:\lo      swlo.dll!SwTextBoxHelper::isTextBox(const 
SwFrameFormat * pFormat, unsigned short nType, const SdrObject * pObject)
            at C:\lo      swlo.dll!SwDoc::GetFlyCount(FlyCntType eType, bool 
bIgnoreTextBoxes)
            at C:\lo      swlo.dll!SwFEShell::GetFlyCount(FlyCntType eType, 
bool bIgnoreTextBoxes)
            at C:\lo      swlo.dll!SwContentType::FillMemberList(bool * 
pbContentChanged)
            at C:\lo      swlo.dll!SwContentTree::HasContentChanged()
            at C:\lo      swlo.dll!SwContentTree::TimerUpdate(Timer * __formal)
            at C:\lo      ...
    
    === call stack 2 ===
    
      tllo.dll!DbgTestSolarMutex()
            at C:\lo      vcllo.dll!OutputDevice::SetDeviceClipRegion(const 
vcl::Region * pRegion)
            at C:\lo      vcllo.dll!OutputDevice::SetClipRegion(const 
vcl::Region & rRegion)
            at C:\lo      vcllo.dll!SvImpLBox::ShowCursor(bool bShow)
            at C:\lo      vcllo.dll!SvImpLBox::UpdateAll()
            at C:\lo      vcllo.dll!SvImpLBox::SetUpdateMode(bool bMode)
            at C:\lo      vcllo.dll!SvTreeListBox::SetUpdateMode(bool bUpdate)
            at C:\lo      vcllo.dll!SalInstanceTreeView::thaw()
            at C:\lo      swlo.dll!SwContentTree::clear()
            at C:\lo      swlo.dll!SwContentTree::Display(bool bActive)
            at C:\lo      swlo.dll!SwContentTree::TimerUpdate(Timer * __formal)
            at C:\lo      ...
    
    Change-Id: I643f5984d4678f8062f20bf341bfad6e8462526b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162865
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 905043ce9716..5655b67ceab1 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -4170,7 +4170,8 @@ IMPL_LINK_NOARG(SwContentTree, TimerUpdate, Timer *, void)
             {
                 SetActiveShell(pActShell);
             }
-            else if ((State::ACTIVE == m_eState || (State::CONSTANT == 
m_eState && pActShell == GetWrtShell())) &&
+            else if (SolarMutexGuard aGuard;
+                     (State::ACTIVE == m_eState || (State::CONSTANT == 
m_eState && pActShell == GetWrtShell())) &&
                         HasContentChanged())
             {
                 FindActiveTypeAndRemoveUserData();

Reply via email to