summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2014-01-27 12:08:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-27 12:24:35 +0000
commit5aa2c17ae7411c2bfe762e11e6514ce88f2bd053 (patch)
tree8357a4ffdaa5e00c255a8a59a5068444ac9d11b0
parent585d54cd6b6c1f223425d8ba9233053727a5b0fe (diff)
fdo#73464 - guard against NULL / unset m_xAccessible.
Change-Id: I3351acf18d334447336ee98761190fdff32d5b85 Reviewed-on: https://gerrit.libreoffice.org/7690 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--winaccessibility/source/UAccCOM/MAccessible.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 5fb1172728ae..6ed3c4ebab09 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -1434,6 +1434,9 @@ IMAccessible* CMAccessible::GetChildInterface(long dChildID)//for test
}
else
{
+ if (!m_xAccessible.is())
+ return NULL;
+
Reference<XAccessibleContext> const pRContext =
m_xAccessible->getAccessibleContext();
if( !pRContext.is() )
@@ -1948,6 +1951,9 @@ STDMETHODIMP CMAccessible:: get_groupPosition(long __RPC_FAR *groupLevel,long __
return E_INVALIDARG;
}
+ if (!m_xAccessible.is())
+ return E_FAIL;
+
Reference<XAccessibleContext> const pRContext =
m_xAccessible->getAccessibleContext();
if(!pRContext.is())
@@ -3316,6 +3322,9 @@ STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr)
ENTER_PROTECTED_BLOCK
ISDESTROY()
+ if (!m_xAccessible.is())
+ return E_FAIL;
+
Reference<XAccessibleContext> pRContext = m_xAccessible->getAccessibleContext();
if( !pRContext.is() )
{