[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - winaccessibility/source
Michael Weghorn (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 1 08:51:02 UTC 2020
winaccessibility/source/UAccCOM/MAccessible.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit d4e4c74829e5c966a0149104228d84be503dc72d
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Wed Jun 3 14:07:39 2020 +0200
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Oct 1 10:47:00 2020 +0200
tdf#133633 winaccessibility: Add null check
The call to 'AccObjectManagerAgent::GetIAccessibleFromResID'
may set 'pImAcc' to nullptr here (s.
'AccObjectWinManager::GetIAccessibleFromResID', which is called
from there), so handle that case gracefully.
Change-Id: I0dbd48974fd012ff086835b147cd9b9cfc8a052b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95430
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
(cherry picked from commit f5f9cac0c5f04246718c438b4673b36e803fda29)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95420
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
(cherry picked from commit bf5e0dc9bd54069f57f41de8746dc29d0ec41061)
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 25c86411f4f6..056ef7c2eb5a 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -784,6 +784,10 @@ STDMETHODIMP CMAccessible::get_accFocus(VARIANT *pvarChild)
{
IMAccessible* pIMAcc = nullptr;
g_pAgent->GetIAccessibleFromResID(m_dFocusChildID,&pIMAcc);
+ if (pIMAcc == nullptr)
+ {
+ return E_FAIL;
+ }
pIMAcc->AddRef();
pvarChild->vt = VT_DISPATCH;
pvarChild->pdispVal = pIMAcc;
More information about the Libreoffice-commits
mailing list