From 5bfdb6cd5f80f87c5bc6b0bccdad5aad00a45ba3 Mon Sep 17 00:00:00 2001 From: Lionel Elie Mamane <lionel@mamane.lu> Date: Mon, 2 Dec 2013 23:55:43 +0100 Subject: fdo#72163 belts and suspenders 1) Do not dispose m_xComposer, might still be used by our m_pCache 2) Do not create a new m_xComposer if the previous one will do, so that we do not gratiously use a different one than our m_pCache. Change-Id: I6540c035c9159017c694b36e676721ec3e42db51 --- dbaccess/source/core/api/RowSet.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'dbaccess') diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 69663d07195e..f2c43457c0dd 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -2250,12 +2250,14 @@ sal_Bool ORowSet::impl_initComposer_throw( OUString& _out_rCommandToExecute ) if ( !bUseEscapeProcessing ) return bUseEscapeProcessing; + if (m_bCommandFacetsDirty) + m_xComposer = NULL; + Reference< XMultiServiceFactory > xFactory( m_xActiveConnection, UNO_QUERY ); - if ( xFactory.is() ) + if ( !m_xComposer.is() && xFactory.is() ) { try { - ::comphelper::disposeComponent( m_xComposer ); m_xComposer.set( xFactory->createInstance( SERVICE_NAME_SINGLESELECTQUERYCOMPOSER ), UNO_QUERY_THROW ); } catch (const Exception& ) { m_xComposer = NULL; } -- cgit