diff options
Diffstat (limited to 'svgio/source/svgreader/svggradientnode.cxx')
-rw-r--r-- | svgio/source/svgreader/svggradientnode.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/svgio/source/svgreader/svggradientnode.cxx b/svgio/source/svgreader/svggradientnode.cxx index 0af85b4d19c7..8d700c5247d4 100644 --- a/svgio/source/svgreader/svggradientnode.cxx +++ b/svgio/source/svgreader/svggradientnode.cxx @@ -59,7 +59,6 @@ namespace svgio SvgGradientNode::~SvgGradientNode() { - delete mpaGradientTransform; // do NOT delete mpXLink, it's only referenced, not owned } @@ -472,7 +471,7 @@ namespace svgio { if(mpaGradientTransform) { - return mpaGradientTransform; + return mpaGradientTransform.get(); } const_cast< SvgGradientNode* >(this)->tryToFindLink(); @@ -487,15 +486,11 @@ namespace svgio void SvgGradientNode::setGradientTransform(const basegfx::B2DHomMatrix* pMatrix) { - if(mpaGradientTransform) - { - delete mpaGradientTransform; - mpaGradientTransform = nullptr; - } + mpaGradientTransform.reset(); if(pMatrix) { - mpaGradientTransform = new basegfx::B2DHomMatrix(*pMatrix); + mpaGradientTransform.reset(new basegfx::B2DHomMatrix(*pMatrix) ); } } |