From: Richard Kimberly Heck Date: Sat, 25 Apr 2020 05:05:15 +0000 (-0400) Subject: Fix bug #11850. X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3bec8e39c778220d37baa9b10396dc3b7944a504;p=features.git 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. --- 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)