Kaydet (Commit) 9cc2a283 authored tarafından Michael Stahl's avatar Michael Stahl Kaydeden (comit) Tobias Madl

framework: avoid double-free in ToolBarManager()

The timer could run after the ToolBarManager is deleted because the
dispose() method can accidentally restart the timer somehow.

Change-Id: I86868f08f436976761e814d4cea1cd5a0e348935
üst ec585136
......@@ -476,7 +476,9 @@ throw ( RuntimeException, std::exception )
{
SolarMutexGuard g;
if ( Action.Action == FrameAction_CONTEXT_CHANGED )
{
m_aAsyncUpdateControllersTimer.Start();
}
}
void SAL_CALL ToolBarManager::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event )
......@@ -1414,7 +1416,9 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
if( m_pToolBar->WillUsePopupMode() )
UpdateControllers();
else if ( m_pToolBar->IsReallyVisible() )
{
m_aAsyncUpdateControllersTimer.Start();
}
// Try to retrieve UIName from the container property set and set it as the title
// if it is not empty.
......@@ -2048,7 +2052,9 @@ IMPL_LINK( ToolBarManager, StateChanged, StateChangedType*, pStateChangedType )
else if ( *pStateChangedType == StateChangedType::VISIBLE )
{
if ( m_pToolBar->IsReallyVisible() )
{
m_aAsyncUpdateControllersTimer.Start();
}
}
else if ( *pStateChangedType == StateChangedType::INITSHOW )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment