wina11y: Return E_INVALIDARG if out param is null
Change-Id: Ia7abdd7fe1fbc5b1a6eaecf7d842852bc3815e6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167201 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
This commit is contained in:
@@ -58,16 +58,18 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccActionBase::nActions(/*[out,retval]*/long*
|
||||
{
|
||||
SolarMutexGuard g;
|
||||
|
||||
if (!nActions)
|
||||
return E_INVALIDARG;
|
||||
|
||||
try {
|
||||
|
||||
if( pRXAct.is() && nActions != nullptr )
|
||||
if (pRXAct.is())
|
||||
{
|
||||
*nActions = pRXAct->getAccessibleActionCount();
|
||||
return S_OK;
|
||||
}
|
||||
if( nActions != nullptr )
|
||||
*nActions = 0;
|
||||
|
||||
*nActions = 0;
|
||||
return S_OK;
|
||||
|
||||
} catch(...) { return E_FAIL; }
|
||||
|
||||
Reference in New Issue
Block a user