[Libreoffice-commits] .: sc/source

Eike Rathke erack at kemper.freedesktop.org
Mon Jan 23 12:17:35 PST 2012


 sc/source/core/data/column3.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6a28de4944a9c40be901f2356e7c295e184c5c95
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Jan 23 21:16:46 2012 +0100

    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.

diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 687c62d..73c0bbb 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 );


More information about the Libreoffice-commits mailing list