783a050
From 2beb3922391ae1a6f1d26128d82c0e34cb963af3 Mon Sep 17 00:00:00 2001
783a050
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
783a050
Date: Tue, 23 Mar 2021 14:55:09 +0000
783a050
Subject: [PATCH] Related: tdf#141197 critical a11y warning
783a050
MIME-Version: 1.0
783a050
Content-Type: text/plain; charset=UTF-8
783a050
Content-Transfer-Encoding: 8bit
783a050
783a050
** (soffice:19098): CRITICAL **: 13:44:40.365:
783a050
AtkObject* atk_object_wrapper_ref(const com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible>&, bool):
783a050
assertion 'bool(rxAccessible)' failed
783a050
783a050
probably since...
783a050
783a050
commit cbc18cc904c652a936c4b68fba4d975bd89b5abd
783a050
Date:   Mon Nov 23 21:03:28 2020 +0100
783a050
783a050
    tdf#138425 vcl/gtk activate main menu in UpdateFull
783a050
783a050
Change-Id: Ieb181e02bb0d2a907aec8534349ec2a80fd9c7e3
783a050
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113000
783a050
Tested-by: Jenkins
783a050
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
783a050
---
783a050
 vcl/source/window/menu.cxx | 2 +-
783a050
 1 file changed, 1 insertion(+), 1 deletion(-)
783a050
783a050
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
783a050
index 4fb964f2f008..233f531cfcaf 100644
783a050
--- a/vcl/source/window/menu.cxx
783a050
+++ b/vcl/source/window/menu.cxx
783a050
@@ -1303,7 +1303,7 @@ css::uno::Reference<css::accessibility::XAccessible> Menu::GetAccessible()
783a050
     // Since PopupMenu are sometimes shared by different instances of MenuBar, the mxAccessible member gets
783a050
     // overwritten and may contain a disposed object when the initial menubar gets set again. So use the
783a050
     // mxAccessible member only for sub menus.
783a050
-    if ( pStartedFrom )
783a050
+    if (pStartedFrom && pStartedFrom != this)
783a050
     {
783a050
         for ( sal_uInt16 i = 0, nCount = pStartedFrom->GetItemCount(); i < nCount; ++i )
783a050
         {
783a050
-- 
783a050
2.30.2
783a050