[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Feb 10 14:47:22 UTC 2021
vcl/unx/gtk3/gtk3gtksalmenu.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 97a2416f90a0eec6eab0e939502450499bd3f383
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Feb 10 11:04:20 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Feb 10 15:46:31 2021 +0100
Related: tdf#140225 ignore activate/deactivate of a disposed VclMenu
prep work for improved solution for tdf#140225
Change-Id: I381d018725c8981ea09ca5d30ec6d669fba15226
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110699
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtksalmenu.cxx b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
index c5e0a9518e39..e81222b69482 100644
--- a/vcl/unx/gtk3/gtk3gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
@@ -1359,8 +1359,10 @@ void GtkSalMenu::Activate(const gchar* pCommand)
{
MenuAndId aMenuAndId = decode_command(pCommand);
GtkSalMenu* pSalMenu = aMenuAndId.first;
- GtkSalMenu* pTopLevel = pSalMenu->GetTopLevel();
Menu* pVclMenu = pSalMenu->GetMenu();
+ if (pVclMenu->isDisposed())
+ return;
+ GtkSalMenu* pTopLevel = pSalMenu->GetTopLevel();
Menu* pVclSubMenu = pVclMenu->GetPopupMenu(aMenuAndId.second);
GtkSalMenu* pSubMenu = pSalMenu->GetItemAtPos(pVclMenu->GetItemPos(aMenuAndId.second))->mpSubMenu;
@@ -1374,8 +1376,10 @@ void GtkSalMenu::Deactivate(const gchar* pCommand)
{
MenuAndId aMenuAndId = decode_command(pCommand);
GtkSalMenu* pSalMenu = aMenuAndId.first;
- GtkSalMenu* pTopLevel = pSalMenu->GetTopLevel();
Menu* pVclMenu = pSalMenu->GetMenu();
+ if (pVclMenu->isDisposed())
+ return;
+ GtkSalMenu* pTopLevel = pSalMenu->GetTopLevel();
Menu* pVclSubMenu = pVclMenu->GetPopupMenu(aMenuAndId.second);
pTopLevel->GetMenu()->HandleMenuDeActivateEvent(pVclSubMenu);
}
More information about the Libreoffice-commits
mailing list