Author: rgheck
Date: Wed Jun 29 16:22:04 2011
New Revision: 39212
URL: http://www.lyx.org/trac/changeset/39212

Log:
Add a sanity check to prevent the crash noted in #7654.

Modified:
   lyx-devel/trunk/src/Text.cpp

Modified: lyx-devel/trunk/src/Text.cpp
==============================================================================
--- lyx-devel/trunk/src/Text.cpp        Wed Jun 29 15:42:55 2011        (r39211)
+++ lyx-devel/trunk/src/Text.cpp        Wed Jun 29 16:22:04 2011        (r39212)
@@ -1249,7 +1249,11 @@
 
                pos_type left  = (pit == begPit ? begPos : 0);
                pos_type right = (pit == endPit ? endPos : parSize);
-
+               
+               if (left == right)
+                       // there is no change here
+                       continue;
+               
                if (op == ACCEPT) {
                        pars_[pit].acceptChanges(left, right);
                } else {

Reply via email to