[LyX/master] Fix bug #11850.
Richard Kimberly Heck
rikiheck at lyx.org
Sat Apr 25 04:42:06 UTC 2020
commit b5a5a529a38c6e4e09f6e089e4725d5b77993efc
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date: Sat Apr 25 01:05:15 2020 -0400
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 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/Text.cpp b/src/Text.cpp
index 1820f05..fa4e2a8 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)
More information about the lyx-cvs
mailing list