From 397fb1a565199c0de34f373a7287476b8d51c1cb Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Mon, 16 Sep 2024 11:09:17 +0100 Subject: wina11y: Just assign the reference No need to manually use the pointer, and have special handling for an empty Reference. Change-Id: I414cfdccacecc79594c0bc5b57d782ea98b811fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173440 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- winaccessibility/source/UAccCOM/AccComponentBase.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'winaccessibility') diff --git a/winaccessibility/source/UAccCOM/AccComponentBase.cxx b/winaccessibility/source/UAccCOM/AccComponentBase.cxx index 27f8354d43de..f0a74a1d09aa 100644 --- a/winaccessibility/source/UAccCOM/AccComponentBase.cxx +++ b/winaccessibility/source/UAccCOM/AccComponentBase.cxx @@ -139,10 +139,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CAccComponentBase::put_XInterface(hyper pXInte return E_FAIL; } Reference pRXI(pRContext, UNO_QUERY); - if (!pRXI.is()) - pRXComp = nullptr; - else - pRXComp = pRXI.get(); + pRXComp = pRXI; return S_OK; } -- cgit