[Libreoffice-commits] core.git: svx/source
Takeshi Abe
tabe at fixedpoint.jp
Sun Sep 10 06:37:29 UTC 2017
svx/source/svdraw/svdocirc.cxx | 6 +-----
svx/source/svdraw/svdopath.cxx | 5 -----
2 files changed, 1 insertion(+), 10 deletions(-)
New commits:
commit 05a09030d1fbe449a619d380214e2601f94950b4
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Sun Sep 10 12:31:38 2017 +0900
Fix double free since 030273e2e28ef9c4d2118ca3851c64498dfe000a
Change-Id: I426b0a6cdc11d3dc8660a440b3e5be9cb198d710
Reviewed-on: https://gerrit.libreoffice.org/42129
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index d20ea32e2c16..8e65570e6b42 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -731,17 +731,13 @@ bool SdrCircObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
SetRectsDirty();
SetXPolyDirty();
ImpSetCircInfoToAttr();
- if (bRet) {
- delete pU;
+ if (bRet)
rStat.SetUser(nullptr);
- }
return bRet;
}
void SdrCircObj::BrkCreate(SdrDragStat& rStat)
{
- ImpCircUser* pU=static_cast<ImpCircUser*>(rStat.GetUser());
- delete pU;
rStat.SetUser(nullptr);
}
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index c364746e9e37..c28d43dd90c5 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -1406,7 +1406,6 @@ bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
bRet = eCmd==SdrCreateCmd::ForceEnd;
if (bRet) {
mbCreating = false;
- delete pU;
rStat.SetUser(nullptr);
}
return bRet;
@@ -1417,7 +1416,6 @@ bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
bRet=eCmd==SdrCreateCmd::ForceEnd;
if (bRet) {
mbCreating=false;
- delete pU;
rStat.SetUser(nullptr);
}
return bRet;
@@ -1501,7 +1499,6 @@ bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
bRet=eCmd==SdrCreateCmd::ForceEnd;
if (bRet) {
mbCreating=false;
- delete pU;
rStat.SetUser(nullptr);
}
return bRet;
@@ -1549,10 +1546,8 @@ bool ImpPathForDragAndCreate::BckCreate(SdrDragStat& rStat)
void ImpPathForDragAndCreate::BrkCreate(SdrDragStat& rStat)
{
- ImpPathCreateUser* pU=static_cast<ImpPathCreateUser*>(rStat.GetUser());
aPathPolygon.Clear();
mbCreating=false;
- delete pU;
rStat.SetUser(nullptr);
}
More information about the Libreoffice-commits
mailing list