From fe15a8f2a513cb7ffa1ebaf4c4ede51974fd1e7e Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 28 May 2011 14:36:50 +0000 Subject: [PATCH] Potential fix for #7591. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@38876 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.cpp | 5 ++++- status.20x | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 2977600915..9ec1e7d4b3 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -669,7 +669,10 @@ void BufferView::setCursorFromScrollbar() // FIXME: Care about the d->cursor_ flags to redraw if needed Cursor old = d->cursor_; mouseSetCursor(cur); - bool badcursor = notifyCursorLeavesOrEnters(old, d->cursor_); + // the DEPM call in mouseSetCursor() might have destroyed the + // paragraph the cursor is in. + bool badcursor = old.fixIfBroken(); + badcursor |= notifyCursorLeavesOrEnters(old, d->cursor_); if (badcursor) d->cursor_.fixIfBroken(); } diff --git a/status.20x b/status.20x index eaa2486a2d..1a4ca53b73 100644 --- a/status.20x +++ b/status.20x @@ -98,6 +98,8 @@ What's new - Fixed crash with inverse search when document has changed (bug 7572). +- Fixed crash when scrolling away from empty paragraph (bug 7591). + - Show the correct label after adding a line to an AMS Multline formula (bug 7511). -- 2.39.5