From 3bec8e39c778220d37baa9b10396dc3b7944a504 Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Sat, 25 Apr 2020 01:05:15 -0400 Subject: [PATCH] Fix bug #11850. When we copy the paragraphs, the Buffer members for the insets are not set. As a result, we crash when attempting to access them. --- src/Text.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Text.cpp b/src/Text.cpp index 1820f0548b..fa4e2a8c9a 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -1801,8 +1801,11 @@ bool Text::dissolveInset(Cursor & cur) pos_type spos = cur.pos(); pit_type spit = cur.pit(); ParagraphList plist; - if (cur.lastpit() != 0 || cur.lastpos() != 0) + if (cur.lastpit() != 0 || cur.lastpos() != 0) { plist = paragraphs(); + for (auto & p : plist) + p.setInsetBuffers(*cur.buffer()); + } cur.popBackward(); // update cursor offset if (spit == 0) -- 2.39.5