accessibility/source/standard/vclxaccessibletabcontrol.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit bbd1eaeb4f8a923d861aae15264b2d4138590642
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Thu Aug 31 14:47:06 2023 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Aug 31 17:00:23 2023 +0200

    a11y: Re-add check for empty reference in VCLXAccessibleTabControl
    
    It got lost with
    
        commit a3f77a61c03340b79930e89d5c4045d814b93edf
        Date:   Wed Aug 30 14:43:18 2023 +0200
    
            use concrete type for 
VCLXAccessibleTabControl::m_aAccessibleChildren
    
    and resulted in a crash when e.g. doing the following
    with the qt6 VCL plugin on Linux:
    
    1) open attachment 189287 from tdf#104833
    2) "Tools" -> "Macros" -> "Organize Dialogs"
    3) select the dialog from the doc
    4) select "Edit"
    
    Change-Id: I2c4aea951976738c575943a64d01eaac2766fdd1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156343
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx 
b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
index 0855b0f177aa..a0990d51febd 100644
--- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx
+++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
@@ -218,7 +218,10 @@ void VCLXAccessibleTabControl::ProcessWindowEvent( const 
VclWindowEvent& rVclWin
 
                 // dispose all tab pages
                 for (const rtl::Reference<VCLXAccessibleTabPage>& i : 
m_aAccessibleChildren)
-                    i->dispose();
+                {
+                    if (i.is())
+                        i->dispose();
+                }
                 m_aAccessibleChildren.clear();
             }
 

Reply via email to