diff options
author | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-08-17 11:10:44 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-08-17 14:01:55 +0200 |
commit | 62d38bed44404844d94ce09b9fb35b3369835c88 (patch) | |
tree | 35d31b2c021aa5cf0cc95bfe197dcf9af0530965 /svx/source/svdraw | |
parent | 83a0796604dedc039a3e65c02453b7de1429316d (diff) |
fdo#37403: Fixed the SdrRectObj::operator = to avoid leaks
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r-- | svx/source/svdraw/svdorect.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index 789622961e2d..6c44a22535f2 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -124,8 +124,13 @@ SdrRectObj& SdrRectObj::operator=(const SdrRectObj& rCopy) SdrTextObj::operator=( rCopy ); + if(mpXPoly) + delete mpXPoly; + if ( rCopy.mpXPoly ) mpXPoly = new XPolygon( *rCopy.mpXPoly ); + else + mpXPoly = rCopy.mpXPoly; return *this; } |