]> git.lyx.org Git - features.git/commitdiff
Add a sanity check to prevent the crash noted in #7654.
authorRichard Heck <rgheck@comcast.net>
Wed, 29 Jun 2011 14:22:04 +0000 (14:22 +0000)
committerRichard Heck <rgheck@comcast.net>
Wed, 29 Jun 2011 14:22:04 +0000 (14:22 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39212 a592a061-630c-0410-9148-cb99ea01b6c8

src/Text.cpp

index a8bc2c9ede576c9ed08098caf1244348f61972be..8996a795d1af67c9fc36790ab247c9b77112d3d1 100644 (file)
@@ -1249,7 +1249,11 @@ void Text::acceptOrRejectChanges(Cursor & cur, ChangeOp op)
 
                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 {