Kaydet (Commit) 722f4e1d authored tarafından Noel Grandin's avatar Noel Grandin

tdf#104573 - Assertion failed: SolarMutex not locked

Change-Id: I91d95e73a7e0831f6667f440dd43567ac55b0529
üst 36569a87
......@@ -92,11 +92,17 @@ VclWindowEvent::VclWindowEvent( vcl::Window* pWin, VclEventId n, void* pDat ) :
VclWindowEvent::~VclWindowEvent() {}
VclMenuEvent::VclMenuEvent( Menu* pM, VclEventId n, sal_uInt16 nPos )
: VclSimpleEvent(n), pMenu(pM), mnPos(nPos)
{}
: VclSimpleEvent(n), mnPos(nPos)
{
SolarMutexGuard aGuard;
pMenu = pM;
}
VclMenuEvent::~VclMenuEvent()
{}
{
SolarMutexGuard aGuard;
pMenu.clear();
}
Menu* VclMenuEvent::GetMenu() const
{
......
......@@ -1407,6 +1407,7 @@ void Menu::ImplAddDel( ImplMenuDelData& rDel )
SAL_WARN_IF( rDel.mpMenu, "vcl", "Menu::ImplAddDel(): cannot add ImplMenuDelData twice !" );
if( !rDel.mpMenu )
{
SolarMutexGuard aGuard;
rDel.mpMenu = this;
rDel.mpNext = mpFirstDel;
mpFirstDel = &rDel;
......@@ -1415,7 +1416,10 @@ void Menu::ImplAddDel( ImplMenuDelData& rDel )
void Menu::ImplRemoveDel( ImplMenuDelData& rDel )
{
rDel.mpMenu = nullptr;
{
SolarMutexGuard aGuard;
rDel.mpMenu = nullptr;
}
if ( mpFirstDel == &rDel )
{
mpFirstDel = rDel.mpNext;
......@@ -2601,7 +2605,10 @@ bool Menu::HandleMenuActivateEvent( Menu *pMenu ) const
{
ImplMenuDelData aDelData( this );
pMenu->pStartedFrom = const_cast<Menu*>(this);
{
SolarMutexGuard aGuard;
pMenu->pStartedFrom = const_cast<Menu*>(this);
}
pMenu->bInCallback = true;
pMenu->Activate();
......@@ -2617,7 +2624,10 @@ bool Menu::HandleMenuDeActivateEvent( Menu *pMenu ) const
{
ImplMenuDelData aDelData( this );
pMenu->pStartedFrom = const_cast<Menu*>(this);
{
SolarMutexGuard aGuard;
pMenu->pStartedFrom = const_cast<Menu*>(this);
}
pMenu->bInCallback = true;
pMenu->Deactivate();
if( !aDelData.isDeleted() )
......
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