commit 0c95259589a5630b21ee5309e0a809a3694b9d06
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Thu Feb 8 19:06:35 2018 +0100

    Reset cur.pit() when pasting into tables.
    
    The number of paragraphs can change here, so pit() can become invalid.
    
    Fixes: #9983
    (cherry picked from commit 6e4e0869006aa4c225162164aaa14a70d041facf)
---
 src/insets/InsetTabular.cpp |    1 +
 status.22x                  |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 2be01bd..08e6f5e 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -6182,6 +6182,7 @@ bool InsetTabular::pasteClipboard(Cursor & cur)
                        inset->setChange(Change(buffer().params().track_changes 
?
                                                Change::INSERTED : 
Change::UNCHANGED));
                        cur.pos() = 0;
+                       cur.pit() = 0;
                }
        }
        return true;
diff --git a/status.22x b/status.22x
index 4cf4c24..6ac16cb 100644
--- a/status.22x
+++ b/status.22x
@@ -92,6 +92,9 @@ What's new
 - Fix crash when closing master with children and grandchildren
   (bug 10766).
 
+- Fix crash when pasting multiple cells into a multi-paragraph cell of
+  a table (bug 9983).
+
 - Fix random crash when dissolving inset (bug 10667).
 
 - Fix potential crash when cursor enters an inset (bug 10691).

Reply via email to