summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Yin <steve_y@apache.org>2014-01-27 05:49:26 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-27 12:23:09 +0000
commit585d54cd6b6c1f223425d8ba9233053727a5b0fe (patch)
tree96e282dd8f974e40bd6660a49707d132e15f3453
parent6eac0306a61066e91ff748a7cb2a6a86a94820ac (diff)
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 Reviewed-on: https://gerrit.libreoffice.org/7689 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--winaccessibility/source/UAccCOM/MAccessible.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 4da2165b94e3..5fb1172728ae 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -378,8 +378,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;
}
@@ -1709,6 +1709,7 @@ STDMETHODIMP CMAccessible::get_nRelations( long __RPC_FAR *nRelations)
SolarMutexGuard g;
ENTER_PROTECTED_BLOCK
+ ISDESTROY()
// #CHECK#
if(nRelations == NULL)
@@ -1802,6 +1803,7 @@ STDMETHODIMP CMAccessible::get_relations( long, IAccessibleRelation __RPC_FAR *_
SolarMutexGuard g;
ENTER_PROTECTED_BLOCK
+ ISDESTROY()
// #CHECK#
if(relation == NULL || nRelations == NULL)
@@ -3311,6 +3313,9 @@ STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr)
{
SolarMutexGuard g;
+ ENTER_PROTECTED_BLOCK
+ ISDESTROY()
+
Reference<XAccessibleContext> pRContext = m_xAccessible->getAccessibleContext();
if( !pRContext.is() )
{
@@ -3334,6 +3339,7 @@ STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr)
return S_OK;
}
+ LEAVE_PROTECTED_BLOCK
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */