summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2007-08-03 08:56:36 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2007-08-03 08:56:36 +0000
commit82526f032780d2d6f54dc0a695f4283b046e581d (patch)
tree1730d4e16faaad87c1ab088b917c47e6b536ff48 /basic
parentf97a739d5424d3c470d73799146460132e40cc71 (diff)
INTEGRATION: CWS ab34 (1.6.56); FILE MERGED
2007/07/24 13:53:11 ab 1.6.56.2: RESYNC: (1.6-1.7); FILE MERGED 2007/07/02 14:14:21 ab 1.6.56.1: #i79074# Applied patch to avoid memory leaks
Diffstat (limited to 'basic')
-rw-r--r--basic/source/sbx/sbxarray.cxx21
1 files changed, 10 insertions, 11 deletions
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index 7ff7567d33da..3be9b997763c 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: sbxarray.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: hr $ $Date: 2007-06-27 14:27:37 $
+ * last change: $Author: hr $ $Date: 2007-08-03 09:56:36 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -101,19 +101,18 @@ SbxArray& SbxArray::operator=( const SbxArray& rArray )
for( UINT32 i = 0; i < pSrc->size(); i++ )
{
SbxVarEntryPtr pSrcRef = (*pSrc)[i];
+ const SbxVariable* pSrc_ = *pSrcRef;
+ if( !pSrc_ )
+ continue;
SbxVarEntryPtr pDstRef = new SbxVarEntry;
*((SbxVariableRef*) pDstRef) = *((SbxVariableRef*) pSrcRef);
if( pSrcRef->pAlias )
pDstRef->pAlias = new XubString( *pSrcRef->pAlias );
- const SbxVariable* pSrc_ = *pSrcRef;
- if( pSrc_ )
- {
- if( eType != SbxVARIANT )
- // Keine Objekte konvertieren
- if( eType != SbxOBJECT || pSrc_->GetClass() != SbxCLASS_OBJECT )
- ((SbxVariable*) pSrc_)->Convert( eType );
- pData->push_back( pDstRef );
- }
+ if( eType != SbxVARIANT )
+ // Keine Objekte konvertieren
+ if( eType != SbxOBJECT || pSrc_->GetClass() != SbxCLASS_OBJECT )
+ ((SbxVariable*) pSrc_)->Convert( eType );
+ pData->push_back( pDstRef );
}
}
return *this;