summaryrefslogtreecommitdiff
path: root/forms/source/component/DatabaseForm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'forms/source/component/DatabaseForm.cxx')
-rw-r--r--forms/source/component/DatabaseForm.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 066eeb45e293..7411abf90351 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -1373,10 +1373,8 @@ void SAL_CALL ODatabaseForm::clearWarnings( )
Reference< XCloneable > SAL_CALL ODatabaseForm::createClone( )
{
- ODatabaseForm* pClone = new ODatabaseForm( *this );
- osl_atomic_increment( &pClone->m_refCount );
+ rtl::Reference<ODatabaseForm> pClone = new ODatabaseForm( *this );
pClone->clonedFrom( *this );
- osl_atomic_decrement( &pClone->m_refCount );
return pClone;
}