From 318719f0011c02fa825a5ffa50199810133de4d8 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 28 May 2011 14:34:19 +0000 Subject: [PATCH] Potential fix for #7591. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38875 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.cpp | 5 ++++- 1 file changed, 4 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(); } -- 2.39.5