winaccessibility/source/UAccCOM/MAccessible.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit 450a5322765324bdf6b8d3185cb39256f3bb3c90 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Wed Jun 3 14:07:39 2020 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Jun 4 13:31:20 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.wegh...@posteo.de> (cherry picked from commit cb55b2854de31004ab1d0277894f9f2581d5c31b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95419 Tested-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index fef53deb4471..c2db8353a888 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -785,6 +785,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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits