vcl: Simplify MenuBar::ImplDestroy a bit
MenuBar::GetWindow() and MenuBar::getMenuBarWindow return a pointer to the same object, so there's no need to use + check both for null. Change-Id: I1b7065e4cd04a24e6215118a8dc71f147ed75132 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177699 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
parent
228f40c5f6
commit
6c48547069
1 changed files with 4 additions and 6 deletions
|
@ -2509,13 +2509,11 @@ VclPtr<MenuBarWindow> MenuBar::ImplCreate(vcl::Window* pParent, MenuBarWindow* p
|
|||
|
||||
void MenuBar::ImplDestroy( MenuBar* pMenu, bool bDelete )
|
||||
{
|
||||
vcl::Window *pWindow = pMenu->GetWindow();
|
||||
if (pWindow && bDelete)
|
||||
MenuBarWindow* pMenuWin = pMenu->getMenuBarWindow();
|
||||
if (pMenuWin && bDelete)
|
||||
{
|
||||
MenuBarWindow* pMenuWin = pMenu->getMenuBarWindow();
|
||||
if (pMenuWin)
|
||||
pMenuWin->KillActivePopup();
|
||||
pWindow->disposeOnce();
|
||||
pMenuWin->KillActivePopup();
|
||||
pMenuWin->disposeOnce();
|
||||
}
|
||||
pMenu->m_pWindow = nullptr;
|
||||
if (pMenu->mpSalMenu) {
|
||||
|
|
Loading…
Reference in a new issue