Author: rgheck
Date: Wed Jun 29 16:24:48 2011
New Revision: 39213
URL: http://www.lyx.org/trac/changeset/39213
Log:
Add a sanity check to prevent the crash noted in #7654.
Modified:
lyx-devel/branches/BRANCH_2_0_X/src/Text.cpp
Modified: lyx-devel/branches/BRANCH_2_0_X/src/Text.cpp
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/src/Text.cpp Wed Jun 29 16:22:04
2011 (r39212)
+++ lyx-devel/branches/BRANCH_2_0_X/src/Text.cpp Wed Jun 29 16:24:48
2011 (r39213)
@@ -1250,7 +1250,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 {