From: Richard Heck Date: Wed, 29 Jun 2011 14:24:48 +0000 (+0000) Subject: Add a sanity check to prevent the crash noted in #7654. X-Git-Tag: 2.0.1~125 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6309880297df5c9ffaf63aa702eff4034eeb985c;p=features.git Add a sanity check to prevent the crash noted in #7654. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@39213 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Text.cpp b/src/Text.cpp index 7da48185c8..7cf206005e 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -1250,7 +1250,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 {