[Libreoffice-commits] .: filter/source
Julien Nabet
serval2412 at kemper.freedesktop.org
Fri Jun 8 16:08:35 PDT 2012
filter/source/svg/svgexport.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 3cf78fa315b84d866e643b93d0083b38bc8dab8c
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Jun 9 01:06:57 2012 +0200
Check for assignment to self for =operator
Change-Id: If5c223e8b2f02938fa7e5d694d07f1e3f036c177
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index e73074a..c6611a8 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -428,6 +428,9 @@ ObjectRepresentation::~ObjectRepresentation()
ObjectRepresentation& ObjectRepresentation::operator=( const ObjectRepresentation& rPresentation )
{
+ // Check for self-assignment
+ if (this == &rPresentation)
+ return *this;
mxObject = rPresentation.mxObject;
delete mpMtf, ( mpMtf = rPresentation.mpMtf ? new GDIMetaFile( *rPresentation.mpMtf ) : NULL );
More information about the Libreoffice-commits
mailing list