From: Georg Baum Date: Sun, 15 Mar 2015 12:56:48 +0000 (+0100) Subject: Add missing check X-Git-Tag: 2.2.0alpha1~1172 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5bb7857bb2d50c4e1cc0ca10e66ff32236acf900;p=lyx.git Add missing check The other insert method has this as well, and it is indeed a problem is pos points outside the vector. --- diff --git a/src/mathed/MathData.cpp b/src/mathed/MathData.cpp index edd8089457..fe73aa8965 100644 --- a/src/mathed/MathData.cpp +++ b/src/mathed/MathData.cpp @@ -68,6 +68,7 @@ MathAtom const & MathData::operator[](pos_type pos) const void MathData::insert(size_type pos, MathAtom const & t) { + LBUFERR(pos <= size()); base_type::insert(begin() + pos, t); }