[Libreoffice-commits] core.git: framework/source
Stephan Bergmann
sbergman at redhat.com
Thu Apr 14 09:20:40 UTC 2016
framework/source/layoutmanager/layoutmanager.cxx | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
New commits:
commit eec11a3064e40c810971350223a6b42cc150bc4c
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Apr 14 11:19:05 2016 +0200
Race between Frame::dispose and timer-triggered LayoutManager::AsyncLayouHdl
Change-Id: I8e9ca61c2a8334697b7a0adef7a2fc20f503f299
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 4eff39e..f2c598a 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -2328,7 +2328,19 @@ bool LayoutManager::implts_doLayout( bool bForceRequestBorderSpace, bool bOuterR
awt::Rectangle aCurrBorderSpace( m_aDockingArea );
Reference< awt::XWindow > xContainerWindow( m_xContainerWindow );
Reference< awt::XTopWindow2 > xContainerTopWindow( m_xContainerTopWindow );
- Reference< awt::XWindow > xComponentWindow( m_xFrame->getComponentWindow() );
+ Reference< awt::XWindow > xComponentWindow;
+ try {
+ xComponentWindow = m_xFrame->getComponentWindow();
+ } catch (css::lang::DisposedException &) {
+ // There can be a race between one thread calling Frame::dispose
+ // (framework/source/services/frame.cxx) -> Frame::disableLayoutManager
+ // -> LayoutManager::attachFrame(null) setting m_xFrame to null, and
+ // the main thread firing the timer-triggered
+ // LayoutManager::AsyncLayoutHdl -> LayoutManager::implts_doLayout and
+ // calling into the in-dispose m_xFrame here, so silently ignore a
+ // DisposedException here:
+ return false;
+ }
Reference< XDockingAreaAcceptor > xDockingAreaAcceptor( m_xDockingAreaAcceptor );
aReadLock.clear();
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
More information about the Libreoffice-commits
mailing list