diff options
author | Eike Rathke <erack@redhat.com> | 2012-01-23 21:16:46 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-01-23 21:17:06 +0100 |
commit | 6a28de4944a9c40be901f2356e7c295e184c5c95 (patch) | |
tree | 983d4d166710e3b6dc65ff3afabb3a64f2c43fa8 /sc | |
parent | 82a061079ae03f841713fd26c809d45621a59836 (diff) |
erase the correct element in ScColumn::Delete(), not the last one
This fixes the dreaded crash in sc_unoapi test.
Thanks to Kohei for pointing in the right direction.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/column3.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 687c62db5aa6..73c0bbbde9bb 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -172,7 +172,7 @@ void ScColumn::Delete( SCROW nRow ) else { pNoteCell->Delete(); - maItems.erase(maItems.end() - 1); + maItems.erase( maItems.begin() + nIndex); // Soll man hier den Speicher freigeben (delta)? Wird dann langsamer! } pCell->EndListeningTo( pDocument ); |