sw/source/core/access/acccontext.cxx |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 2fdfd6fcf6da5f11846c8c99943e24d85baf92c5
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed Oct 9 11:26:05 2019 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Wed Oct 9 13:51:56 2019 +0200

    Resolves: tdf#128037 don't create a11y element just to destroy it
    
    Change-Id: I8d613d30116c0201154773421b4f9eb829a94620
    Reviewed-on: https://gerrit.libreoffice.org/80538
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Caolán McNamara <[email protected]>

diff --git a/sw/source/core/access/acccontext.cxx 
b/sw/source/core/access/acccontext.cxx
index b11cb6cf8329..d1436b3f0c1d 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -1080,16 +1080,18 @@ void SwAccessibleContext::DisposeChild( const 
SwAccessibleChild& rChildFrameOrOb
         if( rChildFrameOrObj.GetSwFrame() )
         {
             ::rtl::Reference< SwAccessibleContext > xAccImpl =
-                    GetMap()->GetContextImpl( rChildFrameOrObj.GetSwFrame() );
-            xAccImpl->Dispose( bRecursive );
+                    GetMap()->GetContextImpl( rChildFrameOrObj.GetSwFrame(), 
false );
+            if (xAccImpl)
+                xAccImpl->Dispose( bRecursive );
         }
         else if ( rChildFrameOrObj.GetDrawObject() )
         {
             ::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl =
                     GetMap()->GetContextImpl( rChildFrameOrObj.GetDrawObject(),
-                                              this );
-            DisposeShape( rChildFrameOrObj.GetDrawObject(),
-                          xAccImpl.get() );
+                                              this, false );
+            if (xAccImpl)
+                DisposeShape( rChildFrameOrObj.GetDrawObject(),
+                              xAccImpl.get() );
         }
         else if ( rChildFrameOrObj.GetWindow() )
         {
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to