Author: rgheck
Date: Sat May 28 16:36:50 2011
New Revision: 38876
URL: http://www.lyx.org/trac/changeset/38876

Log:
Potential fix for #7591.

Modified:
   lyx-devel/branches/BRANCH_2_0_X/src/BufferView.cpp
   lyx-devel/branches/BRANCH_2_0_X/status.20x

Modified: lyx-devel/branches/BRANCH_2_0_X/src/BufferView.cpp
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/src/BufferView.cpp  Sat May 28 16:34:19 
2011        (r38875)
+++ lyx-devel/branches/BRANCH_2_0_X/src/BufferView.cpp  Sat May 28 16:36:50 
2011        (r38876)
@@ -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();
 }

Modified: lyx-devel/branches/BRANCH_2_0_X/status.20x
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/status.20x  Sat May 28 16:34:19 2011        
(r38875)
+++ lyx-devel/branches/BRANCH_2_0_X/status.20x  Sat May 28 16:36:50 2011        
(r38876)
@@ -98,6 +98,8 @@
 
 - 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).
   

Reply via email to