summaryrefslogtreecommitdiff
path: root/sc/source/core/data/dpsave.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/dpsave.cxx')
-rw-r--r--sc/source/core/data/dpsave.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 85316828d15f..9278ffadd87e 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -967,7 +967,10 @@ void ScDPSaveData::SetPosition( ScDPSaveDimension* pDim, long nNew )
{
if (pDim == &(*it))
{
- aDimList.erase(it);
+ // Tell ptr_vector to give up ownership of this element. Don't
+ // delete this instance as it is re-inserted into the container
+ // later.
+ aDimList.release(it).release();
break;
}
}