diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-03-12 03:35:39 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-03-12 13:43:01 +0000 |
commit | 67f4b98b9833f0529cf62928b274ba9234853d2f (patch) | |
tree | 1696424a7661cd40c5db1b5a28acd7ebbc45d4cf /sc | |
parent | baa938b44d1067f81a9dad772e1d15eb48fd12e6 (diff) |
fix memory leak in detective sdr objects
The SdrObject ownership needs to be transferred from the SdrObjList to
the Undo object. Only SdrUndoDelObj takes ownership of the object
SdrUndoRemoveObj does not.
Change-Id: I28f9c538eb4e54ec89ada8521f63d2f49d47a1ff
Reviewed-on: https://gerrit.libreoffice.org/23172
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/detfunc.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index ffce77acb2bc..7e58c7bd4534 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -689,7 +689,7 @@ void ScDetectiveFunc::DeleteArrowsAt( SCCOL nCol, SCROW nRow, bool bDestPnt ) } for (size_t i=1; i<=nDelCount; ++i) - pModel->AddCalcUndo( new SdrUndoRemoveObj( *ppObj[nDelCount-i] ) ); + pModel->AddCalcUndo( new SdrUndoDelObj( *ppObj[nDelCount-i] ) ); for (size_t i=1; i<=nDelCount; ++i) pPage->RemoveObject( ppObj[nDelCount-i]->GetOrdNum() ); |