Author: rgheck
Date: Sat May 28 16:34:19 2011
New Revision: 38875
URL: http://www.lyx.org/trac/changeset/38875
Log:
Potential fix for #7591.
Modified:
lyx-devel/trunk/src/BufferView.cpp
Modified: lyx-devel/trunk/src/BufferView.cpp
==============================================================================
--- lyx-devel/trunk/src/BufferView.cpp Sat May 28 16:19:19 2011 (r38874)
+++ lyx-devel/trunk/src/BufferView.cpp Sat May 28 16:34:19 2011 (r38875)
@@ -669,7 +669,10 @@
// 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();
}