From cfb15d06e82ff9af6a9de2dab815b15e9724c9c6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 11 May 2022 13:17:38 +0200 Subject: in SbUnoObject constructor, only query for XTypeProvider if we're going to use the result Change-Id: I49ad11e287f58c1021e509f56d934aa3ce745b0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134201 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/classes/sbunoobj.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'basic') diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 3dc1b8f643a0..8968f19161c5 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -2311,12 +2311,9 @@ SbUnoObject::SbUnoObject( const OUString& aName_, const Any& aUnoObj_ ) return; } - Reference< XTypeProvider > xTypeProvider; // Did the object have an invocation itself? mxInvocation.set( x, UNO_QUERY ); - xTypeProvider.set( x, UNO_QUERY ); - if( mxInvocation.is() ) { @@ -2324,6 +2321,7 @@ SbUnoObject::SbUnoObject( const OUString& aName_, const Any& aUnoObj_ ) mxExactNameInvocation.set( mxInvocation, UNO_QUERY ); // The remainder refers only to the introspection + Reference< XTypeProvider > xTypeProvider( x, UNO_QUERY ); if( !xTypeProvider.is() ) { bNeedIntrospection = false; -- cgit