sc/source/core/data/column.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit b7c9357dfbd119b0bad5034d61b1be140f99943b
Author: Arul Michael <arul7...@gmail.com>
Date:   Mon May 16 15:52:21 2016 +0530

    tdf#99255 Calc crashing on Undo after Spell Correction
    
     Avoiding null pointers being set for ScPostit* while
    creating the undo document during spell check.
    
    Change-Id: Ieb09cb2cee1c030f275eb5030dd779d543753c8b
    Reviewed-on: https://gerrit.libreoffice.org/25030
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Eike Rathke <er...@redhat.com>
    (cherry picked from commit 2d15020ea29d5541d1c44ff44a06eb5bcb35c52e)
    Reviewed-on: https://gerrit.libreoffice.org/25070

diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 596e338..4a5f266 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1206,9 +1206,13 @@ void ScColumn::CopyCellToDocument( SCROW nSrcRow, SCROW 
nDestRow, ScColumn& rDes
     {
         rDestCol.maCellTextAttrs.set(nDestRow, 
maCellTextAttrs.get<sc::CellTextAttr>(nSrcRow));
         ScPostIt* pNote = maCellNotes.get<ScPostIt*>(nSrcRow);
-        rDestCol.maCellNotes.set(nDestRow, pNote);
         if (pNote)
+        {
+            rDestCol.maCellNotes.set(nDestRow, pNote);
             pNote->UpdateCaptionPos(ScAddress(rDestCol.nCol, nDestRow, 
rDestCol.nTab));
+        }
+        else
+            rDestCol.maCellNotes.set_empty(nDestRow, nDestRow);
     }
     else
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to