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