[Libreoffice-commits] core.git: winaccessibility/source

Steve Yin steve_y at apache.org
Mon Jan 27 03:45:07 PST 2014


 winaccessibility/source/UAccCOM/MAccessible.cxx |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit ff8cb18e21e95e51239f736a525016db689653f0
Author: Steve Yin <steve_y at apache.org>
Date:   Mon Jan 27 05:49:26 2014 +0000

    Resolves: #i124095# Multiple IAccessible and IAccessible2...
    
    interface methods do not check for NULL pointer access, nor do they trap
    exceptions
    
    Fixed by Michael Curran
    (cherry picked from commit 113171f2a5d726af6c5266e98e8e790ac6729d2d)
    
    Conflicts:
    	winaccessibility/source/UAccCOM/MAccessible.cxx
    
    Change-Id: I28d4b885a6c2db487c2754c2ca11290b3844570b

diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 4cba97c..5a62642 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -379,8 +379,8 @@ STDMETHODIMP CMAccessible::get_accChild(VARIANT varChild, IDispatch **ppdispChil
                 return S_OK;
             }
             *ppdispChild = GetChildInterface(varChild.lVal);
-            if (!(*ppdispChild))
-                return S_FALSE;
+            if((*ppdispChild) == NULL)
+                return E_FAIL;
             (*ppdispChild)->AddRef();
             return S_OK;
         }
@@ -1710,6 +1710,7 @@ STDMETHODIMP CMAccessible::get_nRelations( long __RPC_FAR *nRelations)
     SolarMutexGuard g;
 
         ENTER_PROTECTED_BLOCK
+        ISDESTROY()
 
         // #CHECK#
         if(nRelations == NULL)
@@ -1803,6 +1804,7 @@ STDMETHODIMP CMAccessible::get_relations( long, IAccessibleRelation __RPC_FAR *_
     SolarMutexGuard g;
 
         ENTER_PROTECTED_BLOCK
+        ISDESTROY()
 
         // #CHECK#
         if(relation == NULL || nRelations == NULL)
@@ -3312,6 +3314,9 @@ STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr)
 {
     SolarMutexGuard g;
 
+    ENTER_PROTECTED_BLOCK
+    ISDESTROY()
+
     Reference<XAccessibleContext> pRContext = m_xAccessible->getAccessibleContext();
     if( !pRContext.is() )
     {
@@ -3335,6 +3340,7 @@ STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr)
 
         return S_OK;
     }
+    LEAVE_PROTECTED_BLOCK
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list