From 694670e13143f41e211dd0e183516d08008dd12b Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Thu, 15 Feb 2024 09:43:54 +0100 Subject: tdf#159213 a11y: Only send child event if there's a child When reviewing all the places sending an `AccessibleEventId::CHILD` event as described in tdf#159213 comment 8, this here looks like one where the child might not be set. Add a corresponding check to avoid sending an invalid event. Change-Id: I6fea72e8a0619eeec7ac7c9d38dec996ab34752f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163427 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- accessibility/source/standard/vclxaccessiblebox.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'accessibility') diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx index 84855ca096cf..93e49f90c285 100644 --- a/accessibility/source/standard/vclxaccessiblebox.cxx +++ b/accessibility/source/standard/vclxaccessiblebox.cxx @@ -70,7 +70,8 @@ void VCLXAccessibleBox::ProcessWindowChildEvent( const VclWindowEvent& rVclWindo if (m_aBoxType==COMBOBOX) { VclPtr< ComboBox > pComboBox = GetAs< ComboBox >(); - if (pComboBox && pChildWindow && pChildWindow == pComboBox->GetSubEdit()) + if (pComboBox && pChildWindow && pChildWindow == pComboBox->GetSubEdit() + && m_xText.is()) { if (rVclWindowEvent.GetId() == VclEventId::WindowShow) { -- cgit