]> git.lyx.org Git - features.git/commitdiff
Make sanitize more robust to dangling pointers.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 27 Jan 2017 15:36:06 +0000 (16:36 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 1 Feb 2017 09:11:55 +0000 (10:11 +0100)
It is necessary to sanitize the new_word iterator too.

src/Cursor.cpp

index 822dc6e53cbb1519357479fe8224a393502e93c1..14d4a6ae48bb5ae2aef15c63bb0c3c07b2bd22cd 100644 (file)
@@ -2245,6 +2245,7 @@ void Cursor::sanitize()
 {
        setBuffer(&bv_->buffer());
        DocIterator::sanitize();
+       new_word_.sanitize();
        if (selection())
                anchor_.sanitize();
        else