vcl/unx/gtk3/gtk3gtksalmenu.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit 97a2416f90a0eec6eab0e939502450499bd3f383 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Feb 10 11:04:20 2021 +0000 Commit: Caolán McNamara <caol...@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 <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@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); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits