summaryrefslogtreecommitdiff
path: root/tools/source/generic/poly.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'tools/source/generic/poly.cxx')
-rw-r--r--tools/source/generic/poly.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 945c0306e73b..b0f068370d27 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -599,7 +599,7 @@ Polygon::Polygon( const Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVer
const Point aTR( aRect.Right() - nHorzRound, aRect.Top() + nVertRound );
const Point aBR( aRect.Right() - nHorzRound, aRect.Bottom() - nVertRound );
const Point aBL( aRect.Left() + nHorzRound, aRect.Bottom() - nVertRound );
- tools::Polygon* pEllipsePoly = new tools::Polygon( Point(), nHorzRound, nVertRound );
+ std::unique_ptr<tools::Polygon> pEllipsePoly( new tools::Polygon( Point(), nHorzRound, nVertRound ) );
sal_uInt16 i, nEnd, nSize4 = pEllipsePoly->GetSize() >> 2;
mpImplPolygon = new ImplPolygon( pEllipsePoly->GetSize() + 1 );
@@ -620,7 +620,6 @@ Polygon::Polygon( const Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVer
( pDstAry[ i ] = pSrcAry[ i ] ) += aBR;
pDstAry[ nEnd ] = pDstAry[ 0 ];
- delete pEllipsePoly;
}
}
}